Monks,
I am in need of a rather unique solution. I have a string such as V12345:name_test or V12345_name_testWhat I need is that, if there is a "_" after the numbers, to replace it with ":", but if the ":" already exists, any subsequent "_" should remain as is. So "V12345_name_test" should be changed to "V12345:name_test", but "V12345:name_test" should remain unchanged. I've tried several different ways to 'sed' it, but can't get it to work correctly. As usual, any wisdom is greatly appreciated.In reply to replace first occurance if it doesn't already match by ddrew78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |