• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






花生鱼's Blog

■╪ 加快奋斗的脚步
 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

12 2007 档案

 
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/... 阅读全文
posted @ 2007-12-20 22:08 婲生魚 阅读(187) 评论(0) 推荐(0)
[有点点]复杂href获取
摘要://得到下面字符串里“商品列表”的a的hrefstringpattern=@"<ahref='([^']+)[^<]+'>商品列表";Regexr=newRegex(pattern,RegexOptions.IgnoreCase);MatchCollectionmc=r.Matches(data);foreach(Matchminmc){stringss=... 阅读全文
posted @ 2007-12-20 22:00 婲生魚 阅读(749) 评论(0) 推荐(0)
得到所有radio的value和text里的数字
摘要:stringpattern=@"(?<=<)input[^>]+name=[""]?payfee[""]?[^>]+value=[""]?(?<value>\w+)[""]?\s?[^>]+>(?<int>\d+)(?=元)";Regexr=newRegex(pattern,RegexOptions.IgnoreCase);MatchCo... 阅读全文
posted @ 2007-12-20 21:54 婲生魚 阅读(519) 评论(0) 推荐(0)