I am trying to write a RegEx for password validaion to be used but I can not figure out how to do it correctly.
My RegEx so far looks like:

```
regexp = "^(?=.*[0-9]){1,3}(?=.*[a-zA-Z]){1,3}(?=\\s+$)$"

```

Regarding to the password rules:

A) It must include numbers, uppercase and lowercase letters.

B) The number of letters or numbers in a row must be smaller than 4.(e.g. both 1234 and dcba are not allowed)

C) The number of same characters is no more than 3. (e.g. both aaaa and 0000 are not allowed)  

Thanks.