Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

str replace python regex

import re
line = re.sub(r"</?[d+>", "", line)

# Comented version
line = re.sub(r"""
  (?x) # Use free-spacing mode.
  <    # Match a literal '<'
  /?   # Optionally match a '/'
  [   # Match a literal '['
  d+  # Match one or more digits
  >    # Match a literal '>'
  """, "", line)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #str #replace #python #regex
ADD COMMENT
Topic
Name
6+5 =