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

replace number 0 from text Notepad++

I have text that contains numbers, but there is number 0 between text I want to replace it with * character without replace other numbers,Ex:

الموقع0 الالكترووني رقم 0 الجوال 0555044444440
website 055533402220 موقع
لبيبللانمثة0يبر wewf0wef

I need output like:

الموقع* الالكترووني رقم * الجوال 0555044444440
website 055533402220 موقع
لبيبللانمثة*يبر wewf*wef

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

>Solution :

You can use this find/replace pattern:

Find what:: (?<!\d)0(?!\d)
Replace with: * (or whatever you want to replace it with)
⦿ Regular Expression

Replace All

Explanation of the regular expression:

  • (?<!\d): no digit before the current position
  • 0: match a literal "0"
  • (?!\d): no digit after the current position
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