I want to parse an HTML document and get all users’ nicknames.
They are in this format:
<a href="/nickname_u_2412477356587950963">Nickname</a>
How can I do it using a regular expression in PHP? I can’t use DOMElement or simple HTML parsing.
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.
Here is a working solution without using a regular expression:
DomDocument::loadHTML() is forgetting enough to work on malformed HTML.