in reply to Re: Hash/Array help
in thread Hash/Array help

I notice you're always escaping characters that don't need escaping in regex patterns. It's harder to read.

Replies are listed 'Best First'.
Re^3: Hash/Array help
by kennethk (Abbot) on Jul 30, 2009 at 16:49 UTC
    When I first starting learning regexes, one of the books I was reading suggested doing that as future proofing - just because a punctuation character has no meaning in a regular expression now does not mean it won't in the future, and that would be a bug I'd hate to try and track down. I do agree that the result is my expressions suffer from leaning_toothpick_syndrome. I've cut back a bit, but something about that darned comma just begs to be escaped.
      I wouldn't fret it. They're careful with their additions.
      • ?/*/+/{} followed by ?
      • ?/*/+/{} followed by +
      • \ followed by new letters
      • ( followed by ?
      • ( followed by *
      • (? followed by new characters

      In every case, they used sequences that were previously illegal.