I have long strings. Like this
{{ name = name
prodcuer =producer
writer = writer
language = {{english}}
country = USA
}}
Here is text I Need This paragraph.;
I don’t want text between {{ }}. I tried with regex but not found any luck. Can anyone help me please?
Here: http://rubular.com/r/CCW7sAUMrs is an example regex that matches whole text within
{{ }}.You can easily clean up Your string with it using
re.sub.Note, that it will not work when You have text like
{{test}} paragraph {{test}}, because it will match whole string.As larsmans said, it gets harder if You can nest braces. Then it is the job for some kind of Pushdown automaton.
Edit:
Here is the usage: