Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regular expression to match binary data amoun text data

by Jim (Curate)
on Sep 17, 2013 at 21:31 UTC ( #1054543=note: print w/replies, xml ) Need Help??


in reply to Regular expression to match binary data amoun text data

$string=~/.*linux.*/; ^^ ^^

Your use of the two patterns .* in this regular expression are purposeless, and they cause the regular expression engine to do things you don't want it to do. You should remove them.

$string =~ m/linux/;

What are you setting the encoding of the input data to?

Jim

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054543]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2016-12-06 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (105 votes). Check out past polls.