NSError *error;
// NSString *string =@"[@emoji_3sd@]";
//
// NSString *string =@"[@emoji_9@] ddsad[酷] dasdas @emoji_5@ [闪电] [闭嘴] [@emoji_5@] [@emoji_5@]";
//
// NSString *regulaStr = @"\[@emoji_[a-zA-Z0-9]+@\]";
NSString *string =@"<span>手机号码"15521252744"</span> <span>广东 广州 中国联通</span>";
NSString *regulaStr = @"<span>手机号码"(\\d{1,})"</span> <span>(.*?) (.*?) (.*?)</span>";
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:regulaStr
options:NSRegularExpressionCaseInsensitive
error:&error];
[regex enumerateMatchesInString:string options:0 range:NSMakeRange(0, [string length]) usingBlock:^(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL * _Nonnull stop) {
if(result.numberOfRanges>4){
NSString *tel1 =[string substringWithRange:[result rangeAtIndex:1]]; //匹配文本 2匹配子文本
NSString *tel2 =[string substringWithRange:[result rangeAtIndex:2]]; //匹配文本 2匹配子文本
NSString *tel3 =[string substringWithRange:[result rangeAtIndex:3]]; //匹配文本 2匹配子文本
NSString *tel4 =[string substringWithRange:[result rangeAtIndex:4]]; //匹配文本 2匹配子文本
NSLog(@"tel------%@",tel1);
NSLog(@"tel------%@",tel2);
NSLog(@"tel------%@",tel3);
NSLog(@"tel------%@",tel4);
NSLog(@"tel------%@",tel4);
}
}];
入库单 JHStockOrderVC JHStockTableCell
出库单 JHStockOrderVC JHStockTableCell
查询管理 JHStockFindVC JHStockTableCell
商品移库 JHStockMoveVC JHStockTableCell
盘点计划 JHInentroyListVC JHStockTableCell
网友评论