Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Regex: finding all possible substringsby sauoq (Abbot) |
on May 31, 2012 at 23:03 UTC ( [id://973634]=note: print w/replies, xml ) | Need Help?? |
A regular expression probably isn't the best way to do what you want... certainly not just one, at any rate. You are probably better iterating through the string you are searching, grabbing substrings the length of the strings you are searching for, and looking them up in a hash table. Or something similar.
-sauoq "My two cents aren't worth a dime.";
In Section
Seekers of Perl Wisdom
|
|