Hi to all,
I want parse, with iPhone's NSRegularExpression class, this text:
<td class="rowhead">Uploaded</td><td align="left">652.81 GB</td>
for extract Uploaded and 652.81 text.
Thanks in advanced boys!
Hi to all,
I want parse, with iPhone's NSRegularExpression class, this text:
<td class="rowhead">Uploaded</td><td align="left">652.81 GB</td>
for extract Uploaded and 652.81 text.
Thanks in advanced boys!
This is a good write-up on how to strip html in Objective c:
http://rudis.net/content/2009/01/21/flatten-html-content-ie-strip-tags-cocoaobjective-c
You can also use NSXMLParser to get specific fields, or use a UIWebView and a javascript selector.
This string work perfectly for check the link on a html page:
<a href\s*=\s*\"([^\"]*)\">([^<]*)</a>
I have try rewrite the regex for my goal, but don't work :(
<td\\s*([^\"]*)>([^\"]*)\">([^<]*)</td>
Although I do think that an xml parser is more suited to parsing xml, here are some regexes:
given the input string specified and replacing with the first group:
[^>]*>([^<]*)<.*
results in Uploaded
.*>([^<]*)<.*
results in 652.81 GB
You can probably simplify it a little further, but this works.