Need help moving a middle initial from the end of a name to the middle using java regex -
i made topic on before , got closed , labeled off-topic. tried reading faqs couldn't figure out why pardon me if off-topic had additional questions on issue. i have field contains full name in following format: first, last (mi.) challenges: the middle initial isn't present entries don't have middle initial listed. some middle initials have period @ end. many of names spanish names can have multiple first , last names splitting field space isn't option. the name field may have white spaces @ end. the middle name may contain accented character (i couldn't find spanish middle names did start accent couldn't sure wouldn't have any). what i've done far: the first thing did used trim() remove padding @ end of field. fname.trim() next, i've split name first , last names following: string[] names = fname.split(","); i need split middle name last name, can following: fname = names[0] + " " names [1] + " ...