Stephen_IV
Well-known Member
- Joined
- Mar 17, 2003
- Messages
- 1,177
- Office Version
- 365
- 2019
- Platform
- Windows
I am trying to mimic a text editor that I am using for regular expressions in VBA. The text editor I am using is Sublime. I have a bunch of phrases and the numeric values I would like to put a dollar sign in front if I do not already have one. for example:
I have this:
The $40.00 dollar amount is ok with 10.00 down
The 87.00 is what we asked for.
Is Jon getting 3500.00 for his car.
Can I borrow 10.00 until Monday. I will pay you back 15.00.
Is the money for the hat 20.00?
The 11.00 dollar amount is 10.00 ok
using the regex pattern
(?<![$\d])(?=\d+\.\d\d)
and replacing with a $
I get this:
The $40.00 dollar amount is ok with $10.00 down
The $87.00 is what we asked for.
Is Jon getting $3500.00 for his car.
Can I borrow $10.00 until Monday. I will pay you back $15.00.
Is the money for the hat $20.00?
The $11.00 dollar amount is $10.00 ok
Is there a way to do this in VBA??
Thanks in advance!
I have this:
The $40.00 dollar amount is ok with 10.00 down
The 87.00 is what we asked for.
Is Jon getting 3500.00 for his car.
Can I borrow 10.00 until Monday. I will pay you back 15.00.
Is the money for the hat 20.00?
The 11.00 dollar amount is 10.00 ok
using the regex pattern
(?<![$\d])(?=\d+\.\d\d)
and replacing with a $
I get this:
The $40.00 dollar amount is ok with $10.00 down
The $87.00 is what we asked for.
Is Jon getting $3500.00 for his car.
Can I borrow $10.00 until Monday. I will pay you back $15.00.
Is the money for the hat $20.00?
The $11.00 dollar amount is $10.00 ok
Is there a way to do this in VBA??
Thanks in advance!
Last edited: