Sara wrote:
I am looking for a regex which would extract the intials from a
string i.e.
str = "Doe, John L.L.M";
$str =~ /(^(\w)).*?((\s)(\w)).*?((\s)(\w))/;
$initial = $1.$2.$3;
print "$initial";
The above code is not serving my purpose.
String constants: There would be always 3 words (obviou
I am looking for a regex which would extract the intials from a
string i.e.
str = "Doe, John L.L.M";
$str =~ /(^(\w)).*?((\s)(\w)).*?((\s)(\w))/;
$initial = $1.$2.$3;
print "$initial";
The above code is not serving my purpose.
String constants: There would be always 3 words (obvioulsy with 2