Question
Money Matters Develop a regular expression that will accept a dollar amount. For example, $3.56 and $1,000,000 are valid amounts, whereas $5.321 and $5,29,40 are
Money Matters
Develop a regular expression that will accept a dollar amount. For example, $3.56 and $1,000,000 are valid amounts, whereas $5.321 and $5,29,40 are not.
Accept:
ACCEPT: $0 ACCEPT: $0.00 ACCEPT: $0.99 ACCEPT: $4 ACCEPT: $4.00 ACCEPT: $10 ACCEPT: $10.00 ACCEPT: $1000 ACCEPT: $1000.00 ACCEPT: $1,000 ACCEPT: $1,000.00 ACCEPT: $8,888,888,888,888.88 ACCEPT: $88,888,888,888,888.88 ACCEPT: $888,888,888,888,888.88 ACCEPT: $1234567.89
REJECT: $-0 REJECT: $ 0 REJECT: $1.9 REJECT: $.99 REJECT: banana REJECT: $,333.33 REJECT: $12,34 REJECT: $22,333,22,333.22 REJECT: $$$ REJECT: $$$0 REJECT: 3$ REJECT: $02 REJECT: $088,888,98 REJECT: $1,222333 REJECT: $1234412,000,123 REJECT: $02,000.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started