What does the regex look like for matching only the first instance of a comma, and nothing but that comma?
I have tried things like ,{1} and I think it has something to do with non-greedy qualifiers like this ,(.*?), but I have had no success.
I'm 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 occurrences were replaced

/,/, without the/g?string.indexOf(',')?string.indexOf(',')with a combination ofsubstror suchlike if possible,regexis slower.