加载中...
  1. Home
  2. Computing & Technology
  3. Python

Discuss in our forum

Python Regular Expressions Examples - the Dot, Full Stop, or Period

From , former About.com Guide

See More About:

Definition:
 >>> import re 
 >>> list = ['cat', 'car', 'cap', 'cab', 'cad', 'can', 'Katze', 'Auto', 
 'Deckel', 'Droschke', 'Flegel', 'Dose', 'CHAT', 'VOITURE', 'CHAPEAU', 
 'CABINE', 'DAO', 'BIDON'] 
 >>> y = re.compile('c.b') 
 >>> for x in list: 
 ...     if y.match(x): 
 ...             print x 
 ... 
 cab 

Back to the main index of this glossary
Related Searches chat voiture car cap cat car bidon chapeau cabine
  1. Home
  2. Computing & Technology
  3. Python
  4. Regular Expressions
  5. Python RegEx Examples
  6. Character Markers
  7. Python RegEx - Python Regular Expressions - Examples - the Dot, Full Stop, or Period>

©2011 About.com. All rights reserved. 

A part of The New York Times Company.