regex: replacing the 1st occurrence of a character in a string -


I have this string: -

ABCDE / something: XYZ = 0, JKLM = 0 / Something: some_value

What is regex so that only the first colon (:) be replaced with underscore (_)?

In the

After the replacement, you add the qualifier (often 'G') (instead of each example of colon with underscores).

Different languages ​​use different notifications for regular expressions, so the detailed answer depends on the target language. However, I have written to work in 'SAS', 'Edi', 'Vi', 'Vime' and Pearl.


Comments