sed - simple question *SOLVED*
OK. Simple question.
I need some help with runnning a RegEx.
Using the Windows Notepad++, I managed to replace
( [A-Z]* ) ( [A-Z][a-z]* )
with
\1,\2
So my CSV phone directory which had a coule LASTFirst was fixed to LAST,First
But I couldn't manage to pull it off with the sed. And I don't think tr is what I wanted...
I tried
sed s/ ( [A-Z]* ) ( [A-Z][a-z]* ) / \1,\2 /
and I tried putting a '\' in front of: the ',', the '()'s, the '[]'s.
Can someone kindly show me how it is supposed to be done?
Thanks!
EDIT:
> sed s / \( [A-Z]* \) \( [A-Z] [a-z]* \) / \1,\2 /
> sed: -e expression #1, char 1: unterminated `s' command
Off the top of my head:
nicollet@clipper /users/04/info/nicollet> sed -e 's/\([A-Z]*\) \([A-Z][a-z]*\)/\1,\2/'NICOLLET VictorNICOLLET,Victor
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement