2013-10-16 81 views
-2

喜正則表達式的正則表達式這個標籤對Java腳本

img src="http://cache01.g2gtoolkit.com/sites/all/themes/base_hospital_theme/css/images/loading-gif-animation.gif" width="20px" height="20px" 

誰能幫助我?

我已經嘗試了很多東西

imgsrc="http://[^/]+/sites/all/themes/base_hospital_theme/css/images/(.*?)width=.*? 
+7

我覺得很難相信你需要這樣的事情。你想做什麼? – 2013-10-16 18:47:33

+1

正則表達式對我來說很好,如果你使用/.*/風格的聲明正則表達式,你應該逃避所有/ – Einacio

回答

0

你可以試試這個 -

"http://[^/]+/sites/all/themes/base_hospital_theme/css/images/([^"]*)"[\S\s]*?width 

stringified: 

"\"http://[^/]+/sites/all/themes/base_hospital_theme/css/images/([^\"]*)\"[\\S\\s]*?width"