Forum OpenACS Q&A: Full Name Parser Function

Collapse
Posted by Robin Felix on
Does anyone have an already-built SQL or plpgsql function to parse full names that they would be willing to share? I.e.,


"Devon P. Winchester Null"

parsed to

"Devon P. Winchester" and "Null"


I just did about 5000 of these (having 1 to 5 words per name) by exporting to a spreadsheet and doing iterative trimming of the first word, then reassembling the results. I couldn't find an easier prebuilt way, and it would be a useful function to have available in a database.