Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What will be the regular expression to fined out 4.55$, 5$, $45, $7.86 in a string?
Posted
Updated 25-May-12 3:14am
v2

Try:
\d+(\.\d\d)?\$|\$\d+(\.\d\d)?

Get a copy of Expresso[^] - it's free, and it examines and generates Regular expressions.
 
Share this answer
 
Comments
Ed Nutting 24-May-12 7:23am    
My 5+ - Good answer :)
Maciej Los 25-May-12 9:15am    
Good work, my 5!
Looks like you have the answer to your specific question in Solution 1. In the future, if you are looking for a regex you should check out the RegEx Library[^]. They also have an online RegEx tester[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900