[PHP] Re: Need regular match help - possibly

2001-11-22 Thread liljim
Hello Gaylen, try this: $string = preg_replace(/\n{3,}/, \n\n\n, $string); James Gaylen Fraley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I need a routine that will allow me to trap multiple br and/or line feed characters and convert them to a constant

[PHP] Re: Need regular match help - possibly

2001-11-22 Thread liljim
Thinking about it, this would probably be even better: $string = preg_replace(/(\n|br){3,}/i, \\1\\1\\1, $string); This: $string = This is a \n\n\n\n\n\n\n\n\n\n\ntest\nTesting\nTesting\n\n123brbrbrbrbrbr brbrbrbrbrSome more testingbrbrbrbrbrbrbrbrbrAnd a little

[PHP] Re: Need regular match help - possibly

2001-11-22 Thread Gaylen Fraley
Thanks. According to the manual, the br / is for XHTML compliance. This changed in 4.0.5. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.3 Guestbook http://www.gaylenandmargie.com/phpwebsite Liljim [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL