https://regexper.com image.svg is from there
exrex: generate words from regex
- negative lookahead: ^(?!.*bar).*$
e.g.: cut out "id": n in json
^(?!.*("id": ".*.")).*$
- passwords:
^(?=.*?[A-Z]{2,}) # min. 2 upper case
(?=.*?[a-z]{2,}) # min. 2 lower case
(?=.*?[0-9]{2,}) # min. 2 numericals
.{8,8}$ # length between 8,8 => 8
^(?=.*?[A-Z]{2,})(?=.*?[a-z]{2,})(?=.*?[0-9]{2,})(?!.*(.).*\1).{8,8}$
inserting (?!.*(.).*\1) constraints word to be only of unique characters
(
(
(
(?=.*?[A-Z]
).{2,}
)
(
(?=.*?[a-z])
.{2,}
)
(
(?=.*?[0-9])
.{2,}
)
)(?!.*(.).*\1)
)
.{8,8}$
=> ((((?=.*?[A-Z]).{2,})((?=.*?[a-z]).{2,})((?=.*?[0-9]).{2,}))(?!.*(.).*\1)).{8,8}$