標題: regex [打印本頁]
作者: xx123321 時間: 2012-8-25 11:49 標題: regex
本帖最後由 xx123321 於 2012-8-26 09:28 編輯
有条string,
'http://www.google.com/hello/world/ab/c/d.html'
or
'http://www.google.com/hello/world/ab/d.html'
我想抽'http://www.google.com/hello/world/和d.html' 中间既内容.
请问条regex应该点写?
-----------------
自行解決了!
不過都多謝2樓師兄~
作者: 神秘二代 時間: 2012-8-26 00:18
[^http://www.google.com/hello/world/][a-z]+[^d.html]+
test by here
http://www.regular-expressions.info/javascriptexample.html
