Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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 meditating upon the Monastery: (3)
As of 2018-07-20 22:40 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (441 votes). Check out past polls.