As usual, regular expressions are causing my head to hurt.
I have the following strings (as examples) which I would like to parse:
Client: {Path=ClientName}, Balance: {Path=Balance, StringFormat='{0:0.00}'}
Client: {Path=ClientName}, Balance: {Path=Balance, StringFormat='Your balance is {0:0.00}.'}
I am looking for a regular expression (or any other method) which could split the strings as follows and then get the individual key/value values of each. (The idea is to resolve each one of these to a XAML binding)
String 1: {Path=ClientName}
Path = ClientName
String 2: {Path=Balance, StringFormat='{0:0.00}'}
Path = Balance
StringFormat = {0:0.00}
At the moment I have the following regular expression to split the strings but this gets confused by the value of StringFormat due to the '}' in the value.
(?<!'){(.+?)}(?!')
Any idea how I can achieve this?
Thanks!