Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Change the third comma with : regex

I want to change the third comma in this string using regex in notepad ++

145, 45, 67, 688

With a ":"
Like this :

145, 45, 67: 688

I tried this

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

(?:,)(,)*

I think I am missing something

>Solution :

If the third comma is always the last, you can check for the end of the string/line with $:

,(?=[^,]*$)

Demo: https://regex101.com/r/c0XANJ/1

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading