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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!