Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python remove brackets from string

>>> import re
>>> my_str = 'Hello [World]'
>>> re.sub(r'[[]]', r'', my_str)
'Hello World'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #remove #brackets #string
ADD COMMENT
Topic
Name
9+1 =