Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python re split

>>> re.split(r'W+', 'Words, words, words.')
['Words', 'words', 'words', '']
>>> re.split(r'(W+)', 'Words, words, words.')
['Words', ', ', 'words', ', ', 'words', '.', '']
>>> re.split(r'W+', 'Words, words, words.', 1)
['Words', 'words, words.']
>>> re.split('[a-f]+', '0a3B9', flags=re.IGNORECASE)
['0', '3', '9']
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #split
ADD COMMENT
Topic
Name
2+7 =