Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^4: Pattern matching

by parv (Vicar)
on Nov 11, 2018 at 01:53 UTC ( #1225553=note: print w/replies, xml ) Need Help??

in reply to Re^3: Pattern matching
in thread Pattern matching

The output of your Y::R::E is much different than the one provided by AnomalousMonk. Yours is missing word boundary (\b) & space characters (\s). Is that due to problem with copy-paste or your version of Y::R::E module?

Replies are listed 'Best First'.
Re^5: Pattern matching
by soonix (Canon) on Nov 11, 2018 at 21:18 UTC
    Most probably due to passing the regex as string instead of using qr. Besides: the /x flag is missing, too, for the same reason.
      Most probably due to passing the regex as string instead of using qr.

      Most certainly due to this. If warnings had been enabled, some Unrecognized escape \s passed through ... messages would have been seen. (And \b is a backspace IIRC.) The problem could also have been avoided by defining the regex as a single-quoted string, but I would not recommend this because I seem to remember that using single-quoted strings in this way still has some corner-case pitfalls. I agree: use of  qr// is best here.

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2021-11-27 14:38 GMT
Find Nodes?
    Voting Booth?

    No recent polls found