diff options
Diffstat (limited to 'Lib/regsub.py')
-rw-r--r-- | Lib/regsub.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Lib/regsub.py b/Lib/regsub.py index 8fb3306..8e341bb 100644 --- a/Lib/regsub.py +++ b/Lib/regsub.py @@ -1,10 +1,14 @@ -# Regular expression subroutines: -# sub(pat, repl, str): replace first occurrence of pattern in string -# gsub(pat, repl, str): replace all occurrences of pattern in string -# split(str, pat, maxsplit): split string using pattern as delimiter -# splitx(str, pat, maxsplit): split string using pattern as delimiter plus -# return delimiters +"""Regexp-based split and replace using the obsolete regex module. +This module is only for backward compatibility. These operations +are now provided by the new regular expression module, "re". + +sub(pat, repl, str): replace first occurrence of pattern in string +gsub(pat, repl, str): replace all occurrences of pattern in string +split(str, pat, maxsplit): split string using pattern as delimiter +splitx(str, pat, maxsplit): split string using pattern as delimiter plus + return delimiters +""" import regex |