in reply to Re: Pattern Matching
in thread Pattern Matching

I liked [.], ill have to remember that one!

Replies are listed 'Best First'.
Re^3: Pattern Matching
by AnomalousMonk (Archbishop) on Mar 17, 2017 at 05:45 UTC

    IIRC, this is from TheDamian's regex PBPs, which I religiously observe (the others, not so much). Things like  [(] [.] [ ] are visually useful — especially [ ], because what the heck does  \ mean anyway in  /x context, which we ought always to use?


    Give a man a fish:  <%-{-{-{-<

      I recently decided to plunk

      use re '/x';

      in all my new code to make it the default. It takes a while to get used to the free space around tokens -- it's like antigolfing your regexes.

        As long as you're use-ing re '/flags' anyway, add  /ms to  /x to relieve that small, nagging, maddening ache in your left temporal region arising from always having to worry about just what  . ^ $ do, and the difference between single- and multi-line modes. (Another indisputable bit of wisdom from TheDamian.)


        Give a man a fish:  <%-{-{-{-<