Hello,
I am trying to get the positions of every instance of a given substring within
a given superstring (DNA sequence), and currently have a
while ( $super_string =~ m/${sub_string}/gi ) { ... }
construct.
I was under the impression that the regex transmission would bump along every
character and try to match, backtracking even after success to try the
character after the first character from the successful match. However, The
Camel 3rd says that "used in a scalar context, the /g modifier...makes Perl
start the next match on the same variable at a position just past where the
last one stopped"(p151). This is obviously inadequate in cases where one
match may commence within another.
Suggestions?
Thanks in advance,
Nathanael Kuipers
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]