Hi All,
I've got a regular expression in my cocoa-touch app (using RegexKitLite).
NSString *week = [[NSString alloc] initWithFormat:@"%@", [pageContent stringByReplacingOccurrencesOfRegex:@"<select name=\"week\" class=\"selectbox\" style='width:134' onChange=\"doDisplayTimetable(NavBar, topDir);\">(.+?)<option value=\"(.+?)\">(.+?)</option>"
withString:@"$2"]];
I expect it to match with the section of this (what is in NSString pageContent):
<span class="selection">
<nobr>
Periode<br>
<span class="absatz">
<br>
</span>
<select name="week" class="selectbox" style='width:134' onChange="doDisplayTimetable(NavBar, topDir);">
<option value="14">17-5 - 16-7</option>
</select>
</nobr>
</span>
But it doesn't... I need the value of the option, it is possible that there is more than one (in that case I need them both separated by a ,
.
Can someone help me out?
Regards, Dodo