I have an NSString
which initially looked like <a href="http://link.com"> LinkName</a>
. I removed the html tags and now have an NSString
that looks like
http://Link.com SiteName
how can I separate the two into different NSString
s so I would have
http://Link.com
and
SiteName
I specifically want to show the SiteName
in a label and just use the http://Link.com
to open in a UIWebView
but I can't when it is all one string. Any suggestions or help is greatly appreciated.
NSLog output:
Bonus, handle a site name with an embedded space with a RE:
NSLog output:
NSString has a method with the signature:
It returns an array of components as its result. Use it like this:
Good luck.