So let’s say that I have:
<any_html_element>maybe some whitespaces <br/>Some text</any_html_element>
And I want to remove the first <br/> after <any_html_element>.
How can I do that?
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.
Start by not using RegEx, but a HTML parser, to identify the block of code you want to manipulate.
Once you’ve isolated the actual code, you can then do a replace to remove the
<br/>.Here are a couple of PHP HTML parser links to investigate: