- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-21-2023 09:29 PM
Hi,
I need to have a regex validation on a variable that Should accept dollar ammounts like $20.01 etc.
I used this /^\$(?![.0]*$)\d+\.\d{2}$/ , but it accepts only 20.01 as a valid input , I would like it to accept dollar sign too
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-22-2023 04:22 AM
Try this '(\$[0-9]+(.[0-9]+)?)' and let me know if it didn't worked.
Please mark the answer as helpful if it helped you accordingly!
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-21-2023 10:02 PM
Hi @Kumar38 ,
You can try using this regex /^[0-9.,]+$/ . Please let me know if it didn't worked.
Please mark the answer as helpful if it helped you accordingly!
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-22-2023 04:18 AM
It Says not a valid update , when I put this in "Question Regular Expression"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-22-2023 04:22 AM
Try this '(\$[0-9]+(.[0-9]+)?)' and let me know if it didn't worked.
Please mark the answer as helpful if it helped you accordingly!
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-11-2025 12:12 PM
thank you this one without the ' ' worked... š