Friday, May 8, 2009

Regular Expression for non standard characters

When parsing large text files. Some of them have non standard characters.

We just want to parse a file and replace anything that is not found on a keyboard.

Use this Regular Expression for above problem

Regex rx = new Regex("[^\x20-\x7E]");


No comments:

Post a Comment

Code Formater

Paste Here Your Source Code
Source Code Formatting Options
1) Convert Tab into Space :
2) Need Line Code Numbering :
3) Remove blank lines :
4) Embeded styles / Stylesheet :
5) Code Block Width :
6) Code Block Height :
7) Alternative Background :
Copy Formatted Source Code
 
Preview Of Formatted Code