Jump to content

Preg_replace Help


iwpg

Recommended Posts

Hi, I am trying to do something similar to the post at: http://www.phpfreaks.com/forums/index.php/topic,283988.msg1346588.html#msg1346588 but so far I have not had luck.

 

I have a database filled with forum replies that some have quoted text that I want removed, and just show the response. In this case, "You're welcome!" should only be shown. This is what I have so far, but it does nothing:

 

Example:

$pagetext = "[quote=hd331;23548]That makes a lot of sense. Thanks.[/quote]
You're welcome!";
$newpagetext = preg_replace('/\[quote=(.*?)\](.*?)\[\/QUOTE\]/i',' ',$pagetext);

Link to comment
https://forums.phpfreaks.com/topic/194564-preg_replace-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.