kutsurak / python-bitstring

Automatically exported from code.google.com/p/python-bitstring
0 stars 0 forks source link

Allow pad in searches #134

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Nice idea to allow the new pad token in find/replace.

For example:

s.find('0x000001b3, pad:14, 0b1')

which would find the next hex code which is followed by 14 bits of anything and 
then a one bit. Or how about:

s.find('0x000001b3, pad:16, uint:6=a, pad:8*a, 0xff')

maybe do that one later...

Would also affect replace, rfind, findall.

Original issue reported on code.google.com by dr.scott...@gmail.com on 21 Mar 2013 at 9:24

GoogleCodeExporter commented 9 years ago
Interestingly pad is already allowing in find etc. (more by accident than 
design), but it translates to looking for a sequence of zeroed bits.

Original comment by dr.scott...@gmail.com on 21 Mar 2013 at 4:15