Hello, @ואב פתאל, @terry-r and All,
As @terry-r said, regular expressions are not the best way when calculus is involved in the process. However, if the particular case, of all decimal numbers, beginning with the $ sign and ending with the string .99, is your case, a possible regex could be :
SEARCH (\$.*?)((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8))?(?=9*\.99)|(9)
REPLACE (?{12}0:\1(?2:1)(?{3}1)(?{4}2)(?{5}3)(?{6}4)(?{7}5)(?{8}6)(?{9}7)(?{10}8)(?{11}9))
Of course, the Regular expression search mode must be selected and, possibly, the Wrap around option
So, assuming the sample text, below :
Item $0.99 Item $1.99 Item $2.99 Item $3.99 Item $4.99 Item $5.99 Item $6.99 Item $7.99 Item $8.99 Item $9.99 Item $10.99 Item $11.99 Item $12.99 Item $13.99 Item $14.99 Item $15.99 Item $16.99 Item $17.99 Item $18.99 Item $19.99 Item $20.99 ... Item $39.99 ... Item $98.99 Item $99.99 ... Item $9999.99it would give, after global replacement :
Item $1.00 Item $2.00 Item $3.00 Item $4.00 Item $5.00 Item $6.00 Item $7.00 Item $8.00 Item $9.00 Item $10.00 Item $11.00 Item $12.00 Item $13.00 Item $14.00 Item $15.00 Item $16.00 Item $17.00 Item $18.00 Item $19.00 Item $20.00 Item $21.00 ... Item $40.00 ... Item $99.00 Item $100.00 ... Item $10000.00Voilà !
Best Regards,
guy038