Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

re.split return none in the list

# example of expression giving none
re.split(r'(+)|(-)|(*)', text)

# you are getting null because it matches all the groups
# every time it finds a match.
# so just remove the paranthsis after this |
# correct for not getting null

re.split(r'+|-|8', text)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #list
ADD COMMENT
Topic
Name
9+1 =