Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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


Comment on Re: Regular expression to match binary data amoun text data
Select or Download Code

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 musing on the Monastery: (12)
As of 2015-07-06 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls