filmov
tv
JavaScript to normalize names

Показать описание
This script will take a full name (including junk data like designations) and will return a normalized name: "first" or "last".
usage:
alert(getName("first", "TESTIE MCTESTERTON, JR")); //returns "Testie"
alert(getName("first", "TESTIE MCTESTERTON, JR")); //returns "Mctesterton"
usage:
alert(getName("first", "TESTIE MCTESTERTON, JR")); //returns "Testie"
alert(getName("first", "TESTIE MCTESTERTON, JR")); //returns "Mctesterton"