Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -n $c=$x=$_; $x=~s/.*?:\s*(.*)/$1/; $x=~s/(([\da-f]{2}\s)+).*$/$1/s; $c=~s/(\s[\da-f]*:)\s*([\da-f]{2}\s)*\s*(.*?)/$1 $3/; $c=~s/[\r\n]*//sg; $x=~s/([0-9a-f]{2})\s*/\\x$1/g; $x=~s/[\r\n]*//sg; print "\t\"$x\",\t\t/* $c */\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Explanation of a regular expression
by HyperZonk (Friar) on Jul 13, 2001 at 22:39 UTC | |
|
Re: Explanation of a regular expression
by cLive ;-) (Prior) on Jul 13, 2001 at 22:40 UTC | |
by lshatzer (Friar) on Jul 13, 2001 at 23:14 UTC | |
|
Another Way Re: Explanation of a regular expression
by Zaxo (Archbishop) on Jul 14, 2001 at 02:13 UTC |