Hi,
I would like to get an array of <ahtml tags og a string.
I have done this but it doesnt works :
var reg;
var str='Bonjour, ceci est un test, une <a href="phrase.php">phrase</a>
décrivant un <img src="mot.gif" alt="mot"assez <a
href="important.php">important</a>';
reg=new RegExp('<a [^<|>]+>([^<|>]*)<\/a>', "gi");
matchstr=reg.exec(str);
if (matchstr == null)
alert("No match");
else
{
alert(matchstr.length);
for (var i = 0; i < matchstr.length; i++)
{
alert(matchstr[i]);
}
}
My BUG :
matchstr only contains <a href="phrase.php">phrase</abu not <a
href="important.php">important</a!!
How to do then ?
Thanks for any help on it !
Regards
Fred