Try this see if it will work.
#!/usr/bin/perl use strict; use warnings; #my $mystring = "SMITH, A DOE"; my $mystring = "BULLOCK JOE A"; my @array= $mystring =~ m/^[A-Z, ]+([A-Z]{3,}).*?$/; print"$array[0]\n";
In reply to Re^2: RegExp, grabbing first name
by grasshopper!!!
in thread RegExp, grabbing first name
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |