Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Pattern Matching

by huck (Prior)
on Mar 17, 2017 at 04:10 UTC ( [id://1184953]=note: print w/replies, xml ) Need Help??


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:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1184953]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found