I hope there are some regexp experts that can help. I have been searching for hours but can not find an answer.
This is the input string:
parameters:x,y,123,z;parameters:a,b,456,c;
The puzzle is to retreive the last parameters part (a,b,456,c) and I know it starts with "parameters:" and ends with ",c";
So I tried the following regexp:
parameters:(.+?,c);
This matches not the expected last part but the starting from the first parameters. This is the match group:
x,y,123,z;parameters:a,b,456,c
So the ? for doing a lazy match is not lazy enough as it matches more then I want.
Any suggestions?
;, then match?