Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. #
  4. # Copyright (c) 2008 Doug Hellmann All rights reserved.
  5. #
  6. """Translate a glob-style pattern to a regular expression.
  7. """
  8.  
  9. __version__ = "$Id$"
  10. #end_pymotw_header
  11.  
  12. import fnmatch
  13.  
  14. pattern = 'fnmatch_*.py'
  15. print 'Pattern :', pattern
  16. print 'Regex :', fnmatch.translate(pattern)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement