RegEx for matching HTML tags with specific attributes [duplicate]
问题 This question already has answers here : RegEx match open tags except XHTML self-contained tags (34 answers) Closed 8 months ago . I have a string like <span title="use a <label>">Some Content</span> <span title="use a <div>">Some Other Content</span> I need a regex to get only the Some Content or Some Other Content ignoring the tags, even if the tags has another tags inside 回答1: Use a document parser and DOM methods to get the content, not regular expressions. Regex is decidedly the wrong