Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^5: Multiline match

by LanX (Chancellor)
on May 23, 2013 at 16:45 UTC ( #1034986=note: print w/ replies, xml ) Need Help??

in reply to Re^4: Multiline match
in thread Multiline match

thats the way it works

DB<105> $str = "update\npatch-"; => "update\npatch-" DB<106> $patch = "patch-" => "patch-" DB<107> $str =~/\Q$patch/ => 1

$patch must be included in $str not vice versa.

No need for multiline because your pattern doesn't span multiple lines.

'\Q' assures that regex syntax like '.' is escaped.

Cheers Rolf

( addicted to the Perl Programming Language)

Comment on Re^5: Multiline match
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2015-11-29 17:12 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (751 votes), past polls