I have a little problem with regex in iOS.
I want to delete each tag <a> in NSString.
I made this code but it doesn’t stop at first occurence of .
NSString *regexStr = @"<a (.+)>(.+)</a>";
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:regexStr options:NSRegularExpressionCaseInsensitive error:NULL];
prodDescritpion = [regex stringByReplacingMatchesInString:prodDescritpion options:0 range:NSMakeRange(0, [prodDescritpion length]) withTemplate:@"$2"];
Thanks you !
I have find a solution
It works fine !