having trouble with a regular expression. i have an ugly text file to parse that includes the following line
5..... LASTNAME LASTNAME, FIRSTNAME MIDDLENAME TITLE 32 R
the 5..... the 1st character is always a 1 digit number, followed by 1 to 9 '.'
the 32 is age,
the R is a 1 char location
TITLE can be Dr/Mr/Mrs/Ms
variations include:
- 1 or 2 LASTNAME
- 0 to 2 MIDDLENAME
- FIRSTNAME inludes a period ('.')
i currently have:
(^[1-9]{1})\.{1,9} ([A-Z]\S[A-Z])\s(Dr|Mr|Mrs|Ms)\s([0-9]{1,2}\s([A-Z]{1})
but it's not happening. any ideas?
5..... LASTNAME LASTNAME, FIRSTNAME MIDDLENAME TITLE 32 R
the 5..... the 1st character is always a 1 digit number, followed by 1 to 9 '.'
the 32 is age,
the R is a 1 char location
TITLE can be Dr/Mr/Mrs/Ms
variations include:
- 1 or 2 LASTNAME
- 0 to 2 MIDDLENAME
- FIRSTNAME inludes a period ('.')
i currently have:
(^[1-9]{1})\.{1,9} ([A-Z]\S[A-Z])\s(Dr|Mr|Mrs|Ms)\s([0-9]{1,2}\s([A-Z]{1})
but it's not happening. any ideas?