Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex for dollar or currency amounts #16

Open
jkerak opened this issue Nov 29, 2016 · 3 comments
Open

Regex for dollar or currency amounts #16

jkerak opened this issue Nov 29, 2016 · 3 comments

Comments

@jkerak
Copy link

jkerak commented Nov 29, 2016

I find I frequently need a regex for dollar amounts, for example: \d*(\.\d{1,4})?

Would this be something that would make sense to add?

@shobute
Copy link
Contributor

shobute commented Dec 10, 2016

If it's a dollar amount, wouldn't it make more sense to have 2 decimal places, instead of 1 to 4?

@jkerak
Copy link
Author

jkerak commented Dec 10, 2016

Some currencies may have more than 2 decimal places, thus my example, but in most cases, sure, maybe 2 decimal places is more common.

@shobute
Copy link
Contributor

shobute commented Dec 10, 2016

Good point. By "dollar" I thought you meant USD. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants