I have the following string:
Lorem ipsum {{ var1 }} dolar epsum <a href="{{ var2 }}">solar</a> hello goodbye. {{var3}} var {{ var4 }}
How do I capture all occurances of {{ var }}
but not those between double quotes "{{ var2 }}"
?
I have tried (?!")({{.*?}})
but it still captures all instances of {{ var }}
.
Example here: https://regex101.com/r/zfjSI7/1