I have the following NSString:
var param1=8;
var param2=4;
var param3=1;
from which I need to extract the values of the params. I use the NSRegularExpression but cannot have it working:
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"var param1=(.*);\nvar param2=(.*);\nvar param3=(.*)" options:0 error:NULL];
NSTextCheckingResult *match = [regex firstMatchInString:string options:0 range:NSMakeRange(0, [string length])];
NSString *param1= [match rangeAtIndex:1];