Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^3: March a regex using split function

by AnomalousMonk (Chancellor)
on Sep 13, 2017 at 06:18 UTC ( #1199263=note: print w/replies, xml ) Need Help??

in reply to Re^2: March a regex using split function
in thread March a regex using split function

I've no idea what "our" requirement is. My practice is to deploy defensive whitespace in situations like this.

Always /xms:

  • /x always use regex whtespace for comments;
  • /m ^ $ always match embedded newlines;
  • /s dot always matches all.
These regex behavior modifications reduce the "degrees of freedom" of regexes — less to think about.

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

Replies are listed 'Best First'.
Re^4: March a regex using split function
by Anonymous Monk on Sep 13, 2017 at 07:34 UTC
    'mods.x' => '(?x) disregarding whitespace and comments', 'mods.-x' => '(?-x) matching whitespace and # normally',

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1199263]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2018-03-23 09:11 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (289 votes). Check out past polls.