Here is an easy one 🙂 on REGEX
I have this regex
"^\\$?(\\d{1,3},?(\\d{3},?)*\\d{3}(\\.\\d{2})?|\\d{1,3}(\\.\\d{2})?|\\.\\d{2}?)$"
which works on {100, $100, $100.15, $1,000, $1,000.15} and so on….
I want a simple Regex which works on numbers like : {100, 100.15} and thats all – no commas and currency symbols crap…
Thanks,
Voodoo
\d+one or more digits(\.\d{2})?optional decimal part|or(\.\d{2})or just the decimal partIf you make the integer part
\d*, the regex will match an empty string.If you can use look ahead, you can use it to make sure that the string is not empty.