I’m trying to extract multiple parts of a string based on a regular expression like (mymatch1|mymatch2|mymatch3)
I found a function like below, that helps me to extract a match.
NSRange range = [myString rangeOfString:myRegex options:NSRegularExpressionSearch];
But there is any function that can return a set of ranges? or directly the array of substrings matched?
Thanks!
Have you looked at the documentation for NSRegularExpression, methods -[NSRegularExpression enumerateMatchesInString:options:range:usingBlock:]