We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
try
my $string="testing.123"; my @Strings; @Strings=split(/\./,$string); if($Strings[$#Strings] eq "123"){ DoSomething.... } this way you have got the last chunk of the string divided by a period, always, because if there is more than one period then you might not get what you want, but if you have ONLY ONE period and can garrantee it, then use my $string="testing.123"; my $string2; ($string,$string2)=split(/\./,$string); if($string2 eq "123"){ DoSomething.... } good luck! www.arobcorp.com In reply to Re: Help with a regex
by WiseGuru
|
|