I'm trying to determine of a given value is a financial one.
It should match:
- can be positive or negative (ie. 1234.56€ or -1234.56€)
- has minimum 2 digits after the . (ie 1234.5€ should return false)
- whitespaces should be ignored so the user can type 1234.56 € and it still returns true.
I came up with this:
(-|?)[0-9]*(\.|\,)\d\d+€
but I'm having some problems with the whitespaces. Can someone push me in the right direction please? Or maybe it can made better? It's tested with Regular Expression Library.


Sign In
Create Account


Back to top









