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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -