This is some code
<br /> <br /> <br /> <br /> <br /> <br />
but
I want replace
<br /> fourth with <hr />
And this output
<br /> <br /> <br /> <hr /> <br /> <br />
Please help me
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.
Perhaps something like this is what you want:
The output (as seen on ideone.com):
That said, this is a pain and you really shouldn’t be using regex for this.
If you only want to do one replacement, you can set the
limitargument topreg_replace: