Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Confusion in working upon regex with /m

by Fletch (Bishop)
on Nov 12, 2021 at 03:54 UTC ( [id://11138749]=note: print w/replies, xml ) Need Help??


in reply to Confusion in working upon regex with /m

If you use /x you can separate whatever "variable looking" bits follow (or proceed, for that matter) with whitespace.

qr/blah \s+ blah $ yackety \s+ schmakety/mx

Edit: Derp; bad example is bad; see below for better.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: Confusion in working upon regex with /m
by ikegami (Patriarch) on Nov 12, 2021 at 04:58 UTC

    That will never match. $ has to be followed by a line feed or EOS, and you also require that it's followed by a y. Those are mutually exclusive requirements.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found