Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
more useful options
 
PerlMonks  

Re^2: Testing if a string is a substring

by reasonablekeith (Deacon)
on Jul 20, 2005 at 04:58 UTC ( [id://476430]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Testing if a string is a substring
in thread Testing if a string is a substring

I wouldn't use a regex for this, there aren't any patterns, just plain old string matching
my $super = 'AAAAATT'; my $sub = 'AT'; print "1\n" if (index($super, $sub) != -1);
---
my name's not Keith, and I'm not reasonable.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://476430]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.