Input: Hi,,How are you? Fine, thanks ,, , ,,,, , James,Arden.
I would like to replace all consecutive commas with a single comma and a space.
The output should be:
Hi, How are you? Fine, thanks, James,Arden.
SELECT REGEXP_REPLACE('Hi,,How are you? Fine, thanks ,, , ,,,, , James,Arden.', ',,+', ', ') FROM DUAL;
I haven't tested it yet as I don't have access to the Oracle system yet.