in reply to A refactoring trap
As opposed, of course, to potentially confusing regexen such as /\[\s*([^\]]+)/ which, I think, gained a lot of readability with the x:
(note that this regex is part of a script at work where the future maintainers will probably not know regexen well, which explains the over commenting)/\[\s* # literal [ followed by optional whitespace ( # begin capture [^\]]+ # get one or more chars that are not ] ) # end capture /x # end regex
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A refactoring trap
by Anonymous Monk on Aug 17, 2005 at 10:00 UTC | |
by Nkuvu (Priest) on Aug 17, 2005 at 16:55 UTC | |
|
Re^2: A refactoring trap
by ysth (Canon) on Aug 17, 2005 at 05:51 UTC | |
by Nkuvu (Priest) on Aug 17, 2005 at 17:01 UTC |