The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > Developer > Omni Frameworks
FAQ Members List Calendar Today's Posts

 
OFRegularExpression help Thread Tools Search this Thread Display Modes
Hello,
I need some help with OFRegularExpression. I have a NSString containing a bunch of html and I would like to get all of the URL's from the anchor tags.

When I run this it never returns any matches. I tried both regex Strings.

What am I missing here?
Thanks!

NSString *regexString = @"<a href=(.*?)</a>";
//NSString *regexString = @"<a.*?href=[""'](?<url>.*?)[""'].*?>(?<name>.*?)</a>";
OFRegularExpression *vOFRegex = [[OFRegularExpression alloc] initWithString:regexString];
OFRegularExpressionMatch *match = [vOFRegex matchInString:responseString];

while (match) {
NSLog([match matchString]);
match = [match nextMatch];
}
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
OFRegularExpression Queston titaniumdecoy Omni Frameworks 1 2007-10-01 08:33 PM


All times are GMT -8. The time now is 08:26 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.