Jump to content
  • Advertisement
Sign in to follow this  
formalproof

Regular expressions for binary data?

This topic is 3154 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm just wondering: 1) How do people usually search for patterns in binary (non-text) data? 2) Is it possible to use regular expressions for this? 3) Is there a special "regexp for binary data" library available? 4) Is it possible to use a regexp library that is meant for text for binary data as well?

Share this post


Link to post
Share on other sites
Advertisement
Of course it is possible, all you need is a regexp parser that allows you to enter arbitrary symbol into rules. I cannot recall off-hand which of the parser support that, but most of them support entering of symbols as either hex or at least octal.

But as far as regexes go, it makes zero difference if they need to match 'Hi' or 0x01 0xAA.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!