[Omaha.pm] regex'ing binary goo??

Jay Hannah jhannah at omnihotels.com
Tue Aug 29 08:54:28 PDT 2006


$ cat j.pl
my $stream = "A00010\x{1b}\x{be}\x{a}\x{81}D00318";
if ($stream =~ /^A00010.{4}/) {
   print "yes\n";
} else {
   print "no\n";
}

$ perl j.pl
no


What??  That string doesn't start with A00010 followed by 4 somethings?

j


More information about the Omaha-pm mailing list