文字列のすべての文字列を探していますが、なぜコードが機能しないのかわかりません。テキストには、2つの発生があります。Regex in Objective-c
テキスト:
<div class="infosLigneDetail pointer" onclick="javascript:toggleForfait('1');">
Alexandre OUICHER - Forfait Free illimité à 19,99 euros - 0627505460 <input
検索文字列:
Alexandre OUICHER - Forfait Free illimité à 19,99 euros - 0627505460
正規表現:
NSRegularExpression *regexpComptes = [NSRegularExpression regularExpressionWithPattern:@"(?<=javascript:toggleForfait('[0-9]');\">).*?(?=<input)" options:NSRegularExpressionSearch error:NULL];
NSArray *matchesComptes = [regexpComptes matchesInString:content
options:0
range:NSMakeRange(0, [content length])];
問題がどこにあるかあなたが知っていますか?
。文字列が見つかりません –