Re: preg_replace() eating matched strings
- From: Janwillem Borleffs <jw@xxxxxxxxxxxxx>
- Date: Fri, 15 Feb 2008 12:06:25 +0100
MangroveRoot schreef:
Yes, I used 'hexdump' to be sure that the pattern words were not getting
hidden somehow by the newlines.
$foo = "Select this or that or Frick and Frack or ECKS and WHY and ZEE.";
echo "\$foo='$foo'\n";
$foo = preg_replace( "/(and|but|or)/", "\n\$1", $foo);
echo "\$foo='$foo'\n";
JW
.
- References:
- preg_replace() eating matched strings
- From: MangroveRoot
- preg_replace() eating matched strings
- Prev by Date: Re: Code
- Next by Date: Re: Code
- Previous by thread: preg_replace() eating matched strings
- Index(es):