I have a string which can be like "some string {{key:value}} again some string {{key:value}}{{key:value}} some string" I want to find all the {{key:value}} matching sub strings from the given string. for this what pattern I am trying is like :
string ="fdfd{{dsfdss:dssssasa}} fdsfdsfds"
pattern = re.compile("\\\\[a-z]\w+\:\[a-z]\w+\}}")
abc = re.search( pattern, string)
I tried it using this also
pattern = re.compile("\\\\[a-z]\w+:[a-zA-Z]\w+\}}")
abc = re.search( pattern, string)
But each time it is returning None
Suggested me the best way to accomplish it.