Hello everyone, please tell me how to write a regular schedule for these requirements: from 8 to 10 characters, one of the characters must be in upper case, both numbers and letters must be present

Closed due to the fact that the question is too general for the participants Wiktor Stribiżew , rjhdby , ermak0ff , Vadizar , Yuri 11 Mar '17 at 23:56 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    What programming language do you have? - Visman

1 answer 1

At least 8 characters, at least one letter, 1 number and one special character. up to 10 characters Link regex101

"^(?=.*[A-Za-z])(?=.*\d)(?=.*[AZ])(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,10}$" 
  • No один из символов должен быть в верхнем регистре . - Visman
  • Added, check - L. Vadim
  • Those. must the line start with a capital letter (see (?=[AZ]) )? - Wiktor Stribiżew
  • @ WiktorStribiżew Fixed, thanks - L. Vadim
  • Yes, but there is one more inconsistency with the question: (?=.*[$@$!%*#?&]) And it was not required. And [A-Za-z\d$@$!%*#?&] also unclear, just said: from 8 to 10 characters . Most likely .{8,10} will also work. - Wiktor Stribiżew