Quantcast
Channel: Regular expression in struts - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by mathematical.coffee for Regular expression in struts

$
0
0

Your regex is technically incorrect. You can't have a + after a {,} qualifier, it's like saying .*+ or .?* (the + is a special metacharacter in regex meaning "one or more", just like * means "zero or more").

Try

^[-+]?[0-9]{1,3}(\.[0-9]{1,2})$

Notice the {1,3}+ is just a {1,3}.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>