Definition:
Back to the main index of this glossary
>>> import re
>>> list = ['cat', 'car', 'cap', 'cab', 'cad', 'can', 'Cancun', 'Katze', 'Auto', 'Deckel', 'Droschke', 'Flegel', 'Dose', 'Vogel', 'CHAT', 'VOITURE', 'CHAPEAU', 'CABINE', 'DAO', 'BIDON', 'BONBON']
>>> y = re.compile('([cCD]a)|([KAB][uI])')
>>> for x in list:
... if re.search(y,x):
... print x
...
cat
car
cap
cab
cad
can
Cancun
Auto
CABINE
BIDON
Back to the main index of this glossary
