I need to match with regular expression the tokens from text:
Hello {FullName}, I wanted to inform that your product {ProductName} is ready.
Please come to our address {Address} to get it!
How can I match the specific tokens in my text and fill the values using regex?
Also I need to do it in a safe way and avoid every possible issues where the tokens my by misspelled or have something wrong, like bellow:
**Hello {Full{Name}, I { wanted to inform that your product {{ProductName} is ready.
Please come to our } address {Addr{Street}ess} to get it!**
P.S.
I tried this: {([^}]+)}
But if I have for example :
{FullName}
it works, but it also work if I have
{Full{Name} ...
P.S. 2:
I tried this: {=[^{^=^}]*=}
but I have to use another character instead of just curly braces ... is it possible to adjust it so that this will work without the equal character?
{=FullName=} - this works
{=Full{Name=} - this doesn't work
So basically the token is between {=Token=}
instead of {Token}