I have to following text format, i would like to extract content using template.
Value{ABC,XYZ…}|Message{This is test message}
When i encounter above string i would like to extract contents of ‘Value’ and ‘Message’ without parsing entire string in Java.
Is it possible with Regular Expressions?
Yes this is possible with a regular expression, assuming the format doesnt change.
http://rubular.com/r/R8WIonv6Oj <- follow this link for the example.
Has two matching groups for what is in between the curly braces. You could, however, easily do this without resorting to regex