Isnt it possible to write a regular expression using javascript, to return more than one match? I have a string I want to do a match on and find all the image tags and return the value of the alt attribute.
It finds the first match without a problem and I can get the value of the alt attribute but it seems to ignore the other tags even though I've specified the global and ignore-case flags on the regex object.
I need to return the entire tag + the alt value of each img tag in the string but it stops after the first one =/
Any ideas?
Last edited by Andreas Håkansso; Jul 21, 2006 at 09:18.
Bookmarks