diff options
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r-- | Doc/library/re.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst index fef6d2d..a3d3dea 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -546,6 +546,13 @@ form. >>> re.split('\W+', 'Words, words, words.', 1) ['Words', 'words, words.'] + Note that *split* will never split a string on an empty pattern match. + For example :: + + >>> re.split('x*', 'foo') + ['foo'] + >>> re.split("(?m)^$", "foo\n\nbar\n") + ['foo\n\nbar\n'] .. function:: findall(pattern, string[, flags]) |