fork download
  1. import re
  2. text = "Text1.\n Textt « text2 »\n Some other text"
  3. print( re.sub(r'(\.)[^.]*«[^«»]*»', r'\1', text) )
Success #stdin #stdout 0.03s 9628KB
stdin
Standard input is empty
stdout
Text1.
        Some other text