Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^7: regex return true instead of false (precedence)

by rsFalse (Hermit)
on Aug 27, 2019 at 23:08 UTC ( #11105147=note: print w/replies, xml ) Need Help??

in reply to Re^6: regex return true instead of false (precedence)
in thread regex return true instead of false

"I don't understand the purpose of the (*FAIL) operator" -- AnomalousMonk.

It has the same purpose as zero in separated regex example. It allows '||' or '|' be written before first conditional. And then all conditionals have the same line-format. For me it is more readable :)

It is similar to:
if( 0 ){ ; } elsif( condition_1 ){ ... } elsif( condition_2 ){ ... } elsif( condition_3 ){ ... }
...which is sometimes a bit more readable. Also then I can easily change the sequence of conditions by only swapping lines (including the line with the first condition).

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2020-01-20 23:18 GMT
Find Nodes?
    Voting Booth?