A question out of curiosity, is there a way to do pattern matching on a bit level ? Currently all the regex systems I have seen operate on a byte or character based representation, but I haven't seen, any that will let you match on a bit level.
For example, if I have a bit field like this :
011101100011100110110001
(24 bits!) can I check that bits 7,8 & 9 are the pattern 100 ?
Language agnostic answers are preferable, but as I know of nowhere that does it, I would appreciate any insight.
NOTE: I wish to do this on an arbitrary number of bits so converting to bytes (or padding to a byte size) and applying a convoluted normal regexp is NOT what I want !
Thanks,
100anywhere in the stream. You don't want or need regex to check a known fixed position.