Jump to content

[SOLVED] remove [quote]and everything in it [/quote]


Recommended Posts

I am coding a PHP pm system.

 

In it, when a user hits reply, the server adds a

and a [/quote ] to each end of the message so when the user replies, the old message will show up as a quote...

 

However, I only want there to be one trailing message.

 

Therefore, is there a way in PHP Regex to remove everything between the

[/quote ] tags, and them remove the quote tags themselves?

 

For example, if the input was:

 

Here is my reply.

My first message[/quote ]

 

The output should be:

Here is my reply.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.