I've a requirement on Regex like below for U.S. Currency (without ,).
If the user enter amount in TextBox control then it should Auto format with below expected format.
If value is 1111 - then Auto format with $ 1111.00
If value is $1111 - then Auto format with $ 1111.00
If value is $ 1111 - then Auto format with $ 1111.00
If value is 1111.0 - then Auto format with $ 1111.00
If value is $1111.00 - then Auto format with $ 1111.00
I tried like below and it is not working.
\$?\s?(\d+(?:\.\d{1,2})?)
Format: $ $1
Any suggestion please.