Ok, I give... Let me give you an example of the data I need to reformat.
Bob Smith bsmith 00001234567 01/01/1986 00:00:00
Mary Ann Doe mdoe 00001234568 01/01/1986 00:00:00 00001234563 01/01/1986
00:00:00
Gilligan Q Smith gsmith 00001234569 01/01/1986 00:00:00
So format is:
Name LoginID Token Last Login Time (... possible extra tokens and login times)
Trouble here is this, the numbers refer to security token serial numbers (changed to protect the innocent) and the time is the last login time with that token. So, people may have multiple tokens which is why double entry in the Mary Ann above. I need to find a way to comma delimit this file and it seems the hardest part is placing the comma between the login id and the name since there was no standard imposed on the name entered. My thoughts is something along the line of an expression that searches for the 0000 in the token and steps back a space, then a word, then swaps the space ahead of that with a comma, like
s/\s(\w\s0000.*)/,$1/mg
This isnt working, it has no effect on the data at all that I can see. Any ideas would be GREATLY appreciated. Thanks!
</body> </html>In reply to Backtracking for substitutions by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |