in reply to Re^2: Creating spacers in regex match
in thread Creating spacers in regex match

[[:xdigit:]] is a character class that matches a hex digit. See man perlrecharclass. (?s:.) matches any single character; (?s:.*) matches any possible string of characters.

Replies are listed 'Best First'.
Re^4: Creating spacers in regex match
by ahuang14 (Novice) on Jul 08, 2011 at 19:21 UTC
    I tried the xdigit line you gave me and it didnt work.
    my $str = "06 03 01 0f 0e 0b"; if ($str=~ /06 03 01 [[:xdigit:]]{2} [[:xdigit:]]{2} 0b/){ print "hi"; }
      Can you be a bit more specific than "didn't work"? When I try, it prints hi.