I have a line which has lots of words and characters. I just want to remove the part which is included in double curly braces
{{ }}
I tried ?={{.*}} but I am not getting anything.
Try this:
import re
s = re.sub('{{.*?}}', '', s)
Note that { and } are usually special characters in regular expressions and should usually be escaped with a backslash to get their literal meaning. However in this context they are interpreted as literals.
See it working online: ideone
from __future__ import braces(I'm kidding, for anyone new to Python) - SomeKittens