Avatar of Charles Baldo
Charles Baldo
Flag for United States of America asked on

Need Regex Money No $

Please I need a reg ex that will do Money without the $

numbers only
commas in right place
2 dp
no $
Regular ExpressionsASP.NETC#

Avatar of undefined
Last Comment
kaufmed

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rgonzo1971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Dustin Saunders

If it has a $ on it, then it's a string right?  Why not just use:

string.replace("$",string.Empty)

Open in new window


or
string.Substring(1)

Open in new window

kaufmed

^\d{1,3}(,\d{3})*(\.\d\d)?$

Open in new window


If you don't want the decimal part to be optional, then remove the ?
Charles Baldo

ASKER
Worked best
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
kaufmed

I fail to see how considering it allows things like:

1,000,0.00