in reply to Re: Log Parsing using Regex
in thread Log Parsing using Regex

This is exactly what I was looking for. You also helped me gain a deeper understanding of how the character class works in perl regular expressions.

Thanks very much!

Replies are listed 'Best First'.
Re^3: Log Parsing using Regex
by AnomalousMonk (Archbishop) on Jul 09, 2009 at 15:33 UTC
    Note also that  \cA is an alternate representation of 'control-A' both in and out of a character class.
    >perl -wMstrict -le "my $s = qq{fee\x01fie\x01foe}; $s =~ s{ [\cA] }{--}xmsg; print $s; my $t = qq{biz\cAbaz\cAboz}; $t =~ s{ \x01 }{++}xmsg; print $t; " fee--fie--foe biz++baz++boz