Regex expression on currency in catalog item

aj2403
Tera Expert

Hi all,

Can anyone help with the regular expression for the variable in catalog item. The format should starts with '$0.00'. means it should start with $ and numerical values.00

examples are $118.09,$6.08,$3456.52,$12344.17

Thanks

1 ACCEPTED SOLUTION

var regex = /^\$(?![.0]*$)\d+\.\d{2}$/;

Hope it helps!

Please mark helpful or correct if applicable.

View solution in original post

6 REPLIES 6

Hi Koushiki,

There is an issue found, if it $0.00, then this is not allowing. can you kindly help me with this

Thanks,

Worked for me with this. Thanks for ur help on the above