This content has been marked as final.
Show 2 replies
-
1. Re: Crashcourse Regex
swd847 Apr 14, 2010 5:57 AM (in response to marcel.m.vielsack.cluetec.de)try:
\d+(\.\d+)?
\d+ : matches one or more digits
the brackets with the question mark make the decimal point part optional
\. matches a . ( just a . matches any character) -
2. Re: Crashcourse Regex
marcel.m.vielsack.cluetec.de Apr 14, 2010 8:40 AM (in response to marcel.m.vielsack.cluetec.de)Thanks for the answer, Stuart!
I tried the regex you suggested, but seam still tells me that the regex does not match.
I also tried a simpler regex ("\d*") and typed only integer values in my inputfield.in my source file it looks like this;
@Pattern(regex = "\\d*") @Range(min = 0) private Double amount;
Is there maybe a problem because I'm trying to validate a Double with a regex?