What does a regular expression look like for matching only the first instance with a comma and nothing but this comma?
I tried things like ,{1} , and I think this has something to do with non-greedy classifiers, such as ,(.*?) , But I have not been successful.
I am using Notepad ++ to try to convert code from another language to JavaScript. I want to turn the first comma into a colon. It looks like this:
'TJ', 'Tajikistan' , 'TZ', 'Tanzania' , 'TH', 'Thailand' , 'TL', 'Timor-Leste' , 'TG', 'Togo' , 'TK', 'Tokelau' , 'TO', 'Tongo' , 'TT', 'Trinidad and Tobago' ,
Find what: /,/
Replace with :
0 replaced

source share