Changeset 928 for ZMS/trunk/_globals.py
- Timestamp:
- 09.03.2010 22:48:14 (2 years ago)
- File:
-
- 1 edited
-
ZMS/trunk/_globals.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ZMS/trunk/_globals.py
r927 r928 634 634 635 635 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 636 _globals.re_sub: 637 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 638 def re_sub( self, pattern, replacement, subject, ignorecase=False): 639 """ 640 Performs a search-and-replace across subject, replacing all matches of 641 regex in subject with replacement. The result is returned by the sub() 642 function. The subject string you pass is not modified. 643 @rtype: C{string} 644 """ 645 if ignorecase: 646 return re.compile( pattern, re.IGNORECASE).sub( replacement, subject) 647 else: 648 return re.compile( pattern).sub( replacement, subject) 649 650 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 636 651 _globals.re_search: 637 652 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" … … 844 859 return http_import( self, url, method, auth, parse_qs) 845 860 861 def re_sub( self, pattern, replacement, subject, ignorecase=False): 862 return re_sub( self, pattern, replacement, subject, ignorecase=False) 863 846 864 def re_search( self, pattern, subject, ignorecase=False): 847 865 return re_search( self, pattern, subject, ignorecase)
Note: See TracChangeset
for help on using the changeset viewer.
