in reply to Another for those who love the Regular Expression questions...
$x=0; $in=0; $string =~ s#(")?([^" ]+)(")?# if ($in) { print $2; if ($3) { print "\n"; $in=0; } else { print " "; } } else { print "[".$x++."] $2"; if ($in=$1) { print " ";} else { print "\n"; } } #egx;
Could be more compact probably, but I left it "apart" for easier viewing. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Another for those who love the Regular Expression questions...
by chromatic (Archbishop) on Aug 15, 2000 at 00:08 UTC | |
by turnstep (Parson) on Aug 15, 2000 at 00:10 UTC |