in reply to Re: Using variables in regex search
in thread Using variables in regex search
Thanks, Tanktalus!
I'm looking for a literal string. But I would like to find all occurrences of it, not just the first one (index gives only the first match).
A regex search could iterate over all matches. But I think I have to escape the contents of $str, because it's not a regex expression itself...
I'm looking for a literal string. But I would like to find all occurrences of it, not just the first one (index gives only the first match).
A regex search could iterate over all matches. But I think I have to escape the contents of $str, because it's not a regex expression itself...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Using variables in regex search
by Tanktalus (Canon) on Aug 14, 2011 at 14:00 UTC | |
by lancer (Scribe) on Aug 14, 2011 at 15:08 UTC | |
by justin423 (Scribe) on Jul 15, 2023 at 22:37 UTC | |
by haukex (Archbishop) on Jul 17, 2023 at 17:43 UTC | |
by Anonymous Monk on Oct 12, 2015 at 23:29 UTC |
In Section
Seekers of Perl Wisdom