[thelist] JS RegEx Problems
Sam-I-Am
sam at sam-i-am.com
Wed May 2 11:44:08 CDT 2001
hi jeff,
re: matching the link description (text or image) this works for me:
str= '<a href="#" target="_blank" title="some title"><img
src="image.gif" width="1" height="1" alt="some alt"> a</a>';
re = /<a[^>]*>(.*)<\/a>/i;
re.exec(str);
document.write("<xmp>" + RegExp.$1 + "</xmp>");
I've not come across the problem you descripe with match.. but try exec
anyway?
hth
Sam
jeff wrote:
>
> greetings,
>
> i'm trying to use regular expressions to parse the contents of a string,
> identifying the values of various attributes and then storing those
> attributes in an array.
More information about the thelist
mailing list