On Thu, Apr 10, 2008 at 04:12:56PM +0200, Magnus Hagander wrote:
> > > my $replace_re =
> > > qr{^([^:\n\$]+\.c)\s*:\s*(?:%\s*: )?\$(\([^\)]+\))\/(.*)\/[^\/]+$};
> > Perhaps you would like to comment it using the x format, so that it
> > doesn't just look like white noise.
>
> That would be a good idea, no? ;-) I have no idea what you mean with
> "using the x format", though, but I agree in general that the
> white-noise format is not a good idea...
Using x format modifier means you can put comments and whitespace in your
regex, like:
my $replace_re = qr{^([^:\n\$]+\.c) # This matches the filename in $1
\s*:\s*(?:%\s*:\ )? # somethig with a %-sign
...etc...
}x;
Check the perlre manpage for more info.
Have a nice day,
--
Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
signature.asc
Description: Digital signature
