Hi all,
I am trying to write a RegEx
Pattern to replace the MessageFormat variables in a properties
string (e.g. "My name is {0}" should be changed to "My name is <ph id="0">{0}</ph>".
What seemed like a straighforward task, is getting more complicated, because there seems to be no way to match the { character. I have tried the following, but they all get me errors:
Also, if anyone knows of a straighforward way to extract the number in the MsgFormat variable and use it as the value of the id attribute, I would be very grateful.
Thanks a lot in advance.
Cheers,
Martin