Of course, if there's no need to preserve the original string, there's no need to make a copy.my $original = 'KLEWREGREG-----REGREGEWD....-EWGREGERABCSHRE..----...X +FGHWW'; my $copy = $original; $copy =~ s/[-.]+//g; if ($copy =~ /(...)XFGHWW/) { print "Found it: $1\n"; }
In reply to Re: Pattern matching forwards/backwards???
by JavaFan
in thread Pattern matching forwards/backwards???
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |