I'm attempting to take an ldiff file and flip first/last name order. However I can not figure out how to match hyphenated last names. In vim, my current search/replace string is:

%s/cn=\(\w\+\-*\) \(\w\+\),/cn=\2 \1,/gc

This will match:

cn=Smith Joe,

and replace it with:

cn=Joe Smith,

But it will not match:

cn=Smith-Brown Joe,

nor replace it with:

cn=Joe Smith-Brown,

I've tried various incantations of escaping and quantifying yet I can not figure out how to do what I want.

Please show me my error.

Thanks,

Drew

--
Be a Great Magician!
Visit The Alchemist's Warehouse

http://www.alchemistswarehouse.com

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to