void Main() { TestRegex( "siddharth965388888888" ); TestRegex( "s-_]p[{};_~!@#$%.^&()_-+=" ); TestRegex( "siddharth mishra 9653" ); } // Define other methods and classes here private void TestRegex( string str) { Regex reg = new Regex( "^[^\\/?*:|<>\"]+$" ); if (reg.IsMatch(str.ToString())) Console.WriteLine( "Matched" ); else Console.WriteLine( "NO" ); }
Technical Solutions for C, C++, Objective-C, C#, OOP's, Data Structure, Algorithms, Mobile Technology, Mobile Design, HTML/HTML5, Web, iOS/iPad/iPhone, Apple Script, Shell Script, Phonegap, AppAccelerator, Unix, Linux, Mac-OS X, Windows, SQL-Server, PL-SQL, Sqlite3, Database Design issues tips, tricks and hacks by Vinay Mishra.