Given a string, how do I express that a pattern must match multiple regex using the AND operator? For example, I want a password to be a minimum of 5 characters AND maximum of 12 characters.
- Regex for mimimum 5 characters:
.{5,}
- Regex for maximum 12 characters:
.{12}
I know I can combine the above two to something like this: .{5,12}
, but this is not what I am trying to achieve. I want to "and" the two regexes.