help with regular expression

A place to try and solve your RegEx problems.
Post Reply
fgiorgio
Posts: 1
Joined: Thu Dec 15, 2016 2:55 pm

help with regular expression

Post by fgiorgio »

Hello
I would like to find aand replace exactly the number on each row.
For example
9 must be replaced by 500
59 must be replaced by 501
599 must be replaced by 800

Each number on the left is an exact phrase. This means that if I have 599, the first 2 lines MUST be skipped and it should just be replaced by 800.
What is the regular expression on SEARCH?

Hope it is clear my question
Thanks for your help
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: help with regular expression

Post by DigitalVolcano »

to find the exact number you can use the \b word boundary identifier

so

Code: Select all

\b9\b
Will find 9 and not 599
Post Reply