How do I match the end of a regular expression by a word? For example:
<h1><a href=...></a>CONTENT</h1>
Given that <h1> is the start tag, how do I return <a href=...></a>CONTENT?
The expression /< h1>(([<\/h1>\b])*/ does not seem to work
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What makes most regular expressions difficult, is the fact that they’re greedy by default. By making them ungreedy using the
Umodifier, writing something like this becomes very trivial. The following should work.