正则表达式的写法?
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")