so i want to detect email with some specific conditions
- start with letter or number [0-9a-zA-Z]
- before the @ it have to be also a letter or a number [0-9a-zA-Z]
- the email can contain a point in the middle of it but can't contain more than 1 point for example a1bc.2def@gmail.com is correct but a1bc..2def@gmail.com is not correct
- condition the email have to contain 6 minimum until 30 characters maximum
emailText='allo0..oui@gmail.com allo.non@gmail.com'
emailRegex=re.compile(r'[^.][0-9a-z]+[\.]?[0-9a-z]+@gmail.com',re.I)
matchEmail=emailRegex.findall(emailText)
print(matchEmail)
I expected that it will detect only the 2nd email allo.non@gmail.com but it detected also a part of the 1st email oui@gmail.com