J
jm
I was using the following script to find two identical letters in a row,
and now would like to find two letters in a row that are in alphabetic
order,
e.g. ab, or mn, or yz, etc... Haven't had any luck changing the
script
to do that. I'm thinking that I should be able to look ahead to the next
letter.
Is there a way to increment a backreference to do that?
Thanks in advance.
use strict:
use warnings;
while (my $str = <> ){
chomp($str);
while($string =~ /([a-z])(?=\1)/cgi) {
print "Match\n";
}
and now would like to find two letters in a row that are in alphabetic
order,
e.g. ab, or mn, or yz, etc... Haven't had any luck changing the
script
to do that. I'm thinking that I should be able to look ahead to the next
letter.
Is there a way to increment a backreference to do that?
Thanks in advance.
use strict:
use warnings;
while (my $str = <> ){
chomp($str);
while($string =~ /([a-z])(?=\1)/cgi) {
print "Match\n";
}