I’d like to match everything between tags.
what’s the regex to do that?
A bit like
<tr[^>]*>.*?</tr>
But I’d like to not use lazy evaluation.
I want to match each pair like the regex above, but not using lazy evaluation.
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.
Instead of matching lazily, you could use a negative lookahead (if your flavour supports that). Your example would translate to
Of course, you should actually not use regex to parse HTML, as you might have guessed from the comments to your question. =) These expressions may fail horribly on nested tags, comments, and javascript.