I'm trying to find a regex that will match HTML that is in a string starting with <div class="table-responsive" with it's closing </div> tag, ignoring the closing divs that don't close the div with the class "table-responsive". I downloaded HTML from another page on a website with Javascript and I'm setting the innerHTML of a div to contain the info I want displayed from the downloaded HTML. The problem is that I only want the tag starting with <div class="table-responsive" and the closing div displayed and I'm trying to cut out everything but I don't know what the best method is to do that. Can anyone make a suggestion how I can do that?