开发者

Regular Expression for img src using javascript

开发者 https://www.devze.com 2023-02-26 10:35 出处:网络
I want RE for this string pattern: src=\"http://www.prph开发者_如何转开发otos.com/f/1335/CSM-001335/Robert-Pattinson,-Reese-Witherspoon-Water-for-Elephants-New-York-City-Premiere---Arrivals.jpg\"bord

I want RE for this string pattern:

src="http://www.prph开发者_如何转开发otos.com/f/1335/CSM-001335/Robert-Pattinson,-Reese-Witherspoon-Water-for-Elephants-New-York-City-Premiere---Arrivals.jpg"  border="0"

I am using:

<img.[\w+\s+\d+\W]*/>

Also do I have to write different RE for different languages like javascript,PHP etc?


<img [^>]*src=".*?[^\]"[^>]*/>

You may need to write \ as \\

0

精彩评论

暂无评论...
验证码 换一张
取 消