Regular Expression

How i can find the regex of img tag scr from decoded html string in controller?

… you can find it by Google.

1 Like

(post edit: uh-oh, looks like the OP asked this question 2 years ago and this was responded to only recently by the previous poster)

It’s much more reliable if you could access the DOM and directly do something like:

var myImage = document.getElementById("myImageTag").src; (Where myImageTag would be an img id)

Parsing HTML using regex usually leads to a lot of pain. Note that you could instantiate a DOM object from a HTML content as well, like this.

Your image could be a variable


not sure what you mean. the original question stated there was an HTML string he needed parsed.