How to specify logical And in regular expressions?

Well basically the question is clear.
Need to combine ^[A-Za-z0-9]{8,}$ And [A-Z]{1,}

That is, there must be a string with at least one capital letter.
This to start with, then I will complicate the regular season with these I.
June 26th 19 at 14:06
2 answers
June 26th 19 at 14:08
Consistently check several regexps.
if (regex_match($s,'^[A-Za-z0-9]{8,}$') && regex_match($s,'[A-Z]{1,}')) {...}
will not go - Amiya_Walker commented on June 26th 19 at 14:11
June 26th 19 at 14:10

The first uppercase letter, then not less than 7 letters or numbers in any case.
will not go
the string must be a capital letter regardless of where it is... in the beginning, middle or end - Amiya_Walker commented on June 26th 19 at 14:13
: this is not a problem for a single regular expression. It is theoretically possible to write one, but it will be very difficult to understand and change, and work is not faster than done naneskolko regexps and definitely more slowly than do manually in one pass.

You are describing exactly the case about which they say that if you solved the problem with reg expression, but now you have 2 problems. - Amiya_Walker commented on June 26th 19 at 14:16

Find more questions by tags Regular expressions