java - Regular expression of -digit -



java - Regular expression of -digit -

i need regular look match strings : -2,-3,-10,-100 ...

i know regular look of number \\d how can negation before it?

can help me?

assuming don't want match strings "-0" , "-0123", want look

"-[1-9]\\d*"

which requires have minus sign, digit 1 9, , number of additional digits - or none of them. additional digits might include 0. first backslash there escape sec one; , strictly speaking isn't part of regular expression.

java regex

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -