Public
Snippet $1665394 authored by Jören Haag

Java sample password regexp

  • ^: line start
  • (?=.*[0-9]): at least one char between 0-9
  • (?=.*[a-z]): at least one char between a-z
  • (?=.*[a-z]): at least one char between A-Z
  • (?=.*[\\p{Punct}]): at least one char of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
  • (?=\\S+$): no whitespaces
  • .{6,20}: between 6 and 20 chars
  • $: line end
69 Bytes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment