in reply to Re^4: /g option not making s// find all matches (updated)
in thread /g option not making s// find all matches
I like to use default behaviors unless I need to do something that the default can't accomplish.
IMHO this is a good philosophy and I wholeheartedly condone it.
Caveats about house coding rules aside, when working on previously unseen code, if I come across a regex with say /xms and there's no whitespace or no dots or no anchors in it that can cause confusion. What has happened to it? Did it have such things previously and they were edited out? Does the coder not know or understand what the modifiers mean? Is there something in the regex which might change at runtime to make the modifiers useful?
Having read and understood TheDamian's rationale for this I respectfully disagree with it. The beauty of TIMTOWTDI is that everyone can code in the way that they think best. So let's embrace the diversity where it exists for such good reasons.
|
---|