java - Regular exppresion tuning -


i use following regular expression validating 1 of text areas:

^[a-za-z0-9][a-za-z0-9 ]+$ 
  • it allows alpha numeric
  • it avoids first space blank
  • it allow blanks after first character

how should modify able allow following characters:

  • coma (,)
  • semicolon (;)
  • colon (:)
  • euro symbol (€)

^[a-za-z\d:;,\u20ac][a-za-z\d :;,\u20ac]+$ 
  • \d digit
  • \u20ac unicode value euro ()

Comments