in reply to Re^4: example of 'm / / m' related example and compare to 'm / / s'
in thread PERL regex modifiers for m//
Sorry, but I respectfully disagree.
In my experience, matching start- and end-of-line is far more commonly needed that matching start- and end-of-string. The default behaviour is wrong practically every time anyone has to deal with multi-line data.
I'll bet you 100 hours of my time on any (on-line accessible) project of your choosing, that if we do a survey of the regex uses on this site, not only will most of them be targeted at single line strings, an overwhelming majority will be targeted at single line strings.
For sake of putting a number on overwhelming" let's say 10 single line uses to every one multi-line. I'd probably be quite happy to go to 20 to 1 if it would sway you into accepting the bet.
You might find a slightly reduced ratio if you searched CPAN, but I doubt it would be by much.
And once you squash the idea that matching against multi-line strings is the norm, giving away the heads-up that seeing those options explicitly stated should give the programmer, in favour of cargo-culting a 'throw it all in there cos it probably won't cause any problems' mandate, is a really bad idea in my book. In preference to asking the programmer to look up the documentation when they need it is dangerous.
Every time educationalists have tried to "simplify the learning process", by dumbing down, it has increased the pass rate but also wholly devalued it. There's no point in having more people pass if they don't understand how to apply what they've learnt.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: example of 'm / / m' related example and compare to 'm / / s'
by Anonymous Monk on Dec 04, 2011 at 07:23 UTC | |
by BrowserUk (Patriarch) on Dec 04, 2011 at 13:26 UTC | |
by Anonymous Monk on Dec 04, 2011 at 22:29 UTC | |
by BrowserUk (Patriarch) on Dec 04, 2011 at 23:07 UTC |