I'm having trouble with a regex match. Here is the string:
(<a href="HTTP://WWW.TEST.COM/TEST/TEST.JPG">LOREM IPSUM DOLOR SIT AMET, CONSECTETUR ADIPISCING ELIT.</a>) LOREM IPSUM DOLOR <a href="HTTP://WWW.TEST.COM/TEST/TEST.JPG">SIT AMET</a> CONSECTETUR ADIPISCING ELIT. The regex pattern I'm using is:
/(<)(.*=")(.*)(">)(.*)(<\/.*>)/g The problem is that it's only picking up one match because of the .* before in the last matching group in the regex pattern. I want it to find two matches of that pattern (which there is in this string). How do I get it to look for the stop at the first instance of > when searching? I figure that would do the trick.
I've heard it called 'non-greedy'? I've tried a + and ? but neither seem to work with what I'm doing.
Thanks!