I'm trying to match a span element with a certain class name and everything that comes between its start and finish.
My regex is /<\/?(span)[^>]*"myClass".*?<\/span>/gi. It works on <span class="myClass">...</span>, but it fails on something like below, only extending to the first </span>:
<span class="myClass"> ... <span class="anything else"> ... </span> ... </span>
How can I match it all from beginning to end?