I have a string in this format {{varx.vary}}, {{varz.varu}} and {{var1.var2.var3}
i have written a regex expression ([^{}]+)
that match all the fields between {} but am not able to get it to work for fields between double {{}} and ignore if only single curly bracket from one or both sides
Use this: {{([^{}]+)}}
This will make sure that whatever we are getting will be between {{}}