so this is the issue I’m having.
I want to remove this:
[quote="RANDOMTHING"]
Inside the “” could be literarly anything
plus I want to remove
[/quote]
How can I do this with preg_replace?
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.
You just need to escape the
[and use a placeholder (a character class as below, or.*?for anything or\w+for just letters) for the string in quotes:(You can remove the comments and linebreaks to compact it into one line. Just for illustration.)
Also check out https://stackoverflow.com/questions/89718/is-there-anything-like-regexbuddy-in-the-open-source-world if you frequently run into regex questions, but don’t know yet how they work.