Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: pattern matching

by moritz (Cardinal)
on Jun 14, 2009 at 11:27 UTC ( #771389=note: print w/replies, xml ) Need Help??


in reply to pattern matching

The answer to your first question can be found in perlop in the section Regexp Quote-Like Operators

If you use the /s modifier, then . matches any character, including newlines. So for example:

"a\nb" =~ m/a.*b/; # no match "a\nb" =~ m/a.*b/s; # matches

For handling TCP packets I'd rather use an existing module from CPAN.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-07-07 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?