Do you want to extract the strings from the comment, or do you just want to get the three attributes (last_name, mid_name etc) in some particular order?
You can get the parts of the name out of the comment by using the split() filter. This assumes no names contain spaces or whatever split delimiter you use - not a good assumption. Ask Charles de Gaulle.
There is no automatable way to reliably work out what order the parts of a name should be in. Some cultures are firstname, lastname, some are lastname firstname, some are one in some circumstances and the other way in other circumstances, some routinely have three parts, or only one part. Even in the English-speaking world there are zillions of exceptions like J. Edgar Hoover or Fred Smith Junior.