https://www.icyphoenix.com/viewtopic.php?f=28&t=5031&p=35094#p35094
-----------------------------------
Gianni PB
Wed 24 Dec, 2008 13:23

Re: Exclamation Point MOD
-----------------------------------
found a way

[code linenumbers=false]    // Exclamation point in message 
   if (preg_match("/([!?.])+/", $message)) 
   { 
       $message_array = preg_split("/n/", $message); 

       for ($x = 0; $x < count($message_array); $x++) 
       { 
           if (!preg_match("/[.*//", $message_array[$x])) // Ignore BBCode... 
           { 
               $message_array[$x] = preg_replace("/([.]){4,}/", "...", $message_array[$x]);
           }

           if (!preg_match("/[.*//", $message_array[$x])) // Ignore BBCode... 
           { 
               $message_array[$x] = preg_replace("/([!])+/", "\1", $message_array[$x]); 
               $message_array[$x] = preg_replace("/([?])+/", "\1", $message_array[$x]); 
           } 
           $message = implode("n", $message_array);           
       } 
   } [/code]

thanks to JC! :mricy:


