日期:2014-05-17  浏览次数:20779 次

CSS背景图片的正则表达式如何写?
url(images/nan_bg_o.jpg)
这是CSS背景图片的写法,它正则表达式如何写?


------解决方案--------------------
VBScript code
s=".x{background:url(images/nan_bg_o.jpg);}.xx{}.xxx{background:  URL(images/nan_bg_oxx.jpg) ;}"

set rx=new RegExp
rx.IgnoreCase=true
rx.Global=true
rx.Pattern="url\s*\(([^\)]+)\)"
set mc=rx.Execute(s)
for each m in mc
  response.Write "<pre>"&m.submatches(0)&"</pre>"
next
set rx=nothing