I have a series of names, which will appear in cases from simple to complex:<BR><BR>Lastname, First<BR>Van Der Lastname, Firstname J Bob Jr.<BR><BR>I&#039m trying to write a pattern that will match<BR>- everything before the comma,<BR>- the first word after the comma,<BR>- everything to the end of the line<BR>- Jr or Sr.<BR>as a variable number of submatches, either two or three depending on the existence of a middle name or jr/sr. I want at most four submatches.<BR><BR>This works for the first two matches:<BR>"(^w+)+,s(w+)"<BR>but I&#039m confused on how to make the last part optional, without making an overlap of matches with the multiple words that can appear after the comma.<BR><BR>I love regexps, but all the good examples are for perl, which is signifigantly different in syntax and capabilites.<BR><BR>Any Ideas?<BR>