jQuery regex over multiple lines
Posted
by Fuxi
on Stack Overflow
See other posts from Stack Overflow
or by Fuxi
Published on 2010-04-07T23:42:30Z
Indexed on
2010/04/08
0:03 UTC
Read the original article
Hit count: 542
I have the following string:
<img alt="over 40 world famous brandedWATCHES BRANDs to choose from
" src="http://www.fastblings.com/images/logo.jpg"></strong></a><br>
I want to define a regex pattern like <img alt="(.+?)" src="http://(.+?).(jpg|gif)">
, but as you can see the target string has a linebreak in the alt attribute - so how can i incorporate this? the rule should be like "anything in the alt-attribute including linebreaks".
© Stack Overflow or respective owner