#!/usr/bin/perl use strict; my $string = "KLEWREGREG-----REGREGEWD....-EWGREGERABCSHRT..----...XFG +HWW....----....TRYU"; my @array = split ("[.-]+",$string); my $interested = $array[$#array-1]; print $1 if ( $interested =~ m/([a-zA-Z]{3}$)/); Output : HWW
In reply to Re: Pattern matching forwards/backwards???
by 13warrior
in thread Pattern matching forwards/backwards???
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |