fork download
  1. import re
  2. text = "This is a string <code>1234</code> another string <code>123</code> another string <code>123456789</code> another string."
  3. text = re.sub("<code>[^>]{6,}</code>", '', text)
  4. print(text)
  5.  
Success #stdin #stdout 0.02s 9484KB
stdin
Standard input is empty
stdout
This is a string <code>1234</code> another string <code>123</code> another string  another string.