Click here to Skip to main content
15,798,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i am reading .DAT file but i am facing problem of reading correct Data.
I need a regular expression to read exact data from that DAT file.
when i read the data then it is following format!

"\0\0\0×\0\0\0\0\0\0\0\0\0\0\0\0\0OfficeTrainer.exe \0\0\0×\0\0\0\0\0\0\0\0\0\0\0\0\0\nuninst.exe"

i m not understanding what is \0 & . what will be correct regular expression i need to place to format above string.

presently i am using a regular expression that will removes only white spaces..(e.g.@"s\+")

kindly provide me a valid solution!

Updated 1-Oct-10 12:15pm

I m not understanding what is \0
It is to match the single '0'.

"\0\0\0×\0\0\0\0\0\0\0\0\0\0\0\0\0OfficeTrainer.exe \0\0\0×\0\0\0\0\0\0\0\0\0\0\0\0\0\nuninst.exe"


Hope it helps.

Please vote and Accept Answer if it Helped.
Share this answer
Toli Cuturicu 1-Oct-10 17:16pm    
\0 must be the NULL character.
'\0' is (char)0, i.e. the NULL character.
The cross, the black left pointing triangle and the little upper L are Unicode characters.
Share this answer
meBalkrishna 2-Oct-10 3:29am    
how to remove thois from string resultant string!
s = s.Replace(((char)x).ToString(), string.Empty);

where x is the unicode code point of the character. For NULL character it is zero, for the other three, you have to look them up yourself... May I suggest the Windows Accessories Character Map?
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900