Groovy web console

subscribe to the feed Subscribe
to this
site
Check italian or spanish number (via #groovywebconsole)
tweet this snippet Tweet
this
script

Check italian or spanish number

Published 2 months ago by Rindra
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def d = "-3908.456,12"
if ((d  =~ /^-?[0-9]{1,3}(\.[0-9]{3})*(,[0-9]+)?$/).matches())  { return "true";} else { return "false";}