Re: preg_replace ^M
| From: | CPT John W. Holmes | Date: | Thu, 06 Nov 2003 14:12:39 +0000 |
| Subject: | Re: preg_replace ^M | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-168720@lists.php.net to get a copy of this message | ||
From: "Torsten Rosenberger" <rosenberger@taoweb.at>
> i try to replace a string in a file
> but if i have linefeeds in the string
> the output file after the replacement has
> ^M carachters in in
Some text editors will display \r as ^M. So, if you're file uses \r\n as the
newline, you'll see these ^M at the end of each line. Using a different text
editor or adjusting the properties of the one you've got should fix this.
Either way, they shouldn't be visible on the actual PHP/HTML page when
viewed over the web. this is an editor issue, not a PHP one, really.
---John Holmes...