lundi 6 janvier 2020

Using AND & OR operator together in re.search in python?

Is there a way to use AND & OR operator together in re.search in python?

if re.search(r'xyz|abc', line) != None:

Here I have used OR operator, But my requirement is to get line containing ('xyz' or 'abc') and 'pqr'. How to do that?

Aucun commentaire:

Enregistrer un commentaire