in reply to Re: How to get the required names
in thread How to get the required names

Assuming the OP just needs a name for lookup (rather than separate firstname and lastname), I would go the opposite direction:
my $normalized_name = lc $name; $normalized_name =~ tr/a-z//cd; # or =~ s/[^a-z]//g
All of the examples from the initial post would then become identical maggiesmiths. This would also work for the input MaggieSmith and Bubba-Joe Smith (producing bubbajoesmith) and for names which differ in cApiTaLiZatiOn.

But, like you said, the specifics are a little sparse, so this solution may also be unsuitable.