I have an NSString like that :" abc xyz http://www.abc.com aaa bbb ccc"
How can I get the substring http://www.abc.com from that NSString? Thanks in advance.
I have an NSString like that :" abc xyz http://www.abc.com aaa bbb ccc"
How can I get the substring http://www.abc.com from that NSString? Thanks in advance.
If all of your substrings are separated by spaces, you can try to get an array of substrings using [myString componentsSeparatedByString:@" "]. Then you can check result of [NSUrl URLWithString:yourSubstring]. It will return nil if the substring isn't a correct link.
A possible solution might be using regular expressions. Check out RegexKit.