js 正则
摘要:match对字符串执行查找,并将包含查找的结果作为数组返回。str.match(/\(\d{10,12}\)/g)[0].replace(/\(|\)/g,"")replace行文字替换后的字符串的复制//去掉所有空格str='啊,b,cdefgh不';varre=newRegExp('\\s+','g');str=str.replace(re,'');//str=str.replace(/\s/...
阅读全文
[有点点]复杂href获取
摘要://得到下面字符串里“商品列表”的a的hrefstringpattern=@"<ahref='([^']+)[^<]+'>商品列表";Regexr=newRegex(pattern,RegexOptions.IgnoreCase);MatchCollectionmc=r.Matches(data);foreach(Matchminmc){stringss=...
阅读全文
得到所有radio的value和text里的数字
摘要:stringpattern=@"(?<=<)input[^>]+name=[""]?payfee[""]?[^>]+value=[""]?(?<value>\w+)[""]?\s?[^>]+>(?<int>\d+)(?=元)";Regexr=newRegex(pattern,RegexOptions.IgnoreCase);MatchCo...
阅读全文