java - Regex to allow only numbers, hyphens, brackets, plus sign and spaces -


i trying form regex allow only numbers, hyphens, brackets, plus sign , spaces can found anywhere. here examples:

(90990)-121332 (13)920298-232 897897-8098 +988 8892 222 987878798798 4234232211 

^[\\d() +-]+$ 
  • ^ start of string
  • $ til end
  • \\d digit
  • () +- brackets, space, plus or dash
  • []+ 1 or more of those

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -