Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: RegEx on Binary data

by dave_the_m (Prior)
on Oct 02, 2012 at 19:37 UTC ( #996901=note: print w/replies, xml ) Need Help??

in reply to RegEx on Binary data

Like runrig said, you probably want to unpack the individual fields first, but in answer to your question, perhaps something like:
$packed_record =~ /^[\x00-\xff]{8,15}\xaa\xbb\xcc/;


Replies are listed 'Best First'.
Re^2: RegEx on Binary data
by rdaniels_77 (Initiate) on Oct 02, 2012 at 19:59 UTC

    The library approach doesn't actually work for me. I should have prefaced that I am not using raw Perl, but compiled PCRE in C language, so I needed the raw RegEx.

    I'll play with that expression...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996901]
[hippo]: On my tab key the left pointing arrow is directly above the right-pointing arrow (and they are each pointing at a vertical line). It's a UK keyboard.
[Discipulus]: choroba thanks.. now i understand: like find the tresaure.. but in this case seems true: no one noticed
[Discipulus]: Happy-the-monk every Eatalian understand what ctrl+shift+tab means: we just have different names for # and @ ('cancelletto' and 'chiocciola')

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2017-11-21 10:22 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (297 votes). Check out past polls.