首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

正则表达式的写法?该怎么解决

2012-05-05 
正则表达式的写法?https://www.google.com.hk/#hlzh-CN&newwindow1&safestrict&site&sourcehp&q8888

正则表达式的写法?
https://www.google.com.hk/#hl=zh-CN&newwindow=1&safe=strict&site=&source=hp&q=8888&btnK=Google+%E6%90%9C%E7%B4%A2&oq=&aq=&aqi=&aql=&gs_nf=&gs_l=&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=b623e282e8fa625&biw=1680&bih=959


想从url中得到关键词8888,用正则该怎么写?





[解决办法]
result = RegReplace(url,".*?q=([^&]+).*","$1")

试试

[解决办法]
result = RegReplace(url,".*?(#|\?|&)q=([^&]+).*","$2")

热点排行