Charles Curley wrote:
You've got the x flag, please use it!
You mean this regex is x rated?
hehe...
actually though, for any who don't know:
In perl regex, there are flags at the end (to be fixed, perl6 has them
rightly in the front) that modify your engine. One of these is the
underutilized x modifier. When added, it makes whitespace insignificant
in your regex, so you can nicely tab/space/newline in order to actually
be readable... Oh, and you can/should add comments also. so:
s/(foo|bar)//;
can be
s/
( # either
foo
| # or...
bar
)
//x;
very simplified, but the basic point is there. Make things readable,
comment, etc....
--
Jayce^
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/