|Don't ask to ask, just ask|
Regex Doubt.by Anonymous Monk
|on Oct 16, 2012 at 03:00 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
Hi Monks, I have a doubt regarding Perl Regex.
my $total_names = "Matthew,Thomas,Peter,Randy,George,Federick";
my $last_name = $1 if ($total_names =~ /,(.*)/i);
I want to print the last name "Federick" only. but now its printing from "Thomas to Federick". Pls can you suggest a way.(using regex). Thanks in advance Monks.