Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2016-09-27 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (502 votes). Check out past polls.