开发者

comparing some pattern with regular expression C#

开发者 https://www.devze.com 2022-12-13 12:16 出处:网络
I am parsing binary file. File size can be large. I want to search a some pattern in that file. the string is

I am parsing binary file. File size can be large. I want to search a some pattern in that file. the string is

anynumber 0 obj<< any

alpha,symbol,digit...anythin开发者_如何转开发g

>>endobj

Bold text indicates compulsory string. So, My QUESTION is - should I do it by regular expression or search it by coding. After that I want to store it in a dictionary. If regular expression then what it be? what is the fastest way? I am using VS-2005.


\d+0 obj\<\<.*\>\>endobj

\d    - decimal digit
+     - 1 or more
\<    - < should be treated as a literal
.     - any character
*     - 0 or more
>    - > should be treated as a literal

0

精彩评论

暂无评论...
验证码 换一张
取 消