Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python split

a='Beautiful_abs,     asd       is    ; better*than
ugly.dat'
import re
re.split('; |.|,|_|	+| +|*|
',a)  
# you can add seperated term inside | | eg if you want to selerte by $ |$| 
output ['Beautiful', 'abs', '', 'asd', 'is', '', 'better', 'than', 'ugly','dat']
# use as below for white spaces only
a.split()
output : ['Beautiful_abs,', 'asd', 'is', ';', 'better*than', 'ugly.dat']
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #split
ADD COMMENT
Topic
Name
7+6 =