I have a line containing several pairs of parameters / values ββin the form:
{type1|value1}{type2|value2} .....
I need to find if a particular type is inside the string (currently using indexOf search for "{type3|", for example), but then I need to get the value from this pair.
I could just put the line from the start point into another line, and then look for the location of the beginning and end of the value ("|" and "}"), but I'm sure there should be an easier way, possibly using Regex.
Any ideas please?
source
share