JBottero
10-21-2007, 01:13 AM
I need to replace linefeeds and returns between test from a text box input. There might be any number in any order. For example"
test\r\r\r\n\r\n\rtest
Should change to:
test<SomeString>test
I've tried:
$data = preg_replace("/[\r|\n]*/", '<SomeString>', $original_data);
But it doesn't work as I need...
So, any Reg Ex gurus out there have any suggestions?
test\r\r\r\n\r\n\rtest
Should change to:
test<SomeString>test
I've tried:
$data = preg_replace("/[\r|\n]*/", '<SomeString>', $original_data);
But it doesn't work as I need...
So, any Reg Ex gurus out there have any suggestions?