Re: ^k ? -- how do I match that?
| From: | liljim | Date: | Tue, 16 Jul 2002 08:35:53 +0000 |
| Subject: | Re: ^k ? -- how do I match that? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107821@lists.php.net to get a copy of this message | ||
Hi Jimmy,
In many cases, I'd go for a regex, though with this (because it's just a
straight replacement), I'd just use str_replace (and since about the closest
thing to a vertical tab would be a new line in html, use that as the
replacement):
$string = str_replace("^K", "\n", $string);
James
"Jimmy Brake" <jbrake@covalent.net> wrote in message
news:1026765137.15017.151.camel@linux...
> Hi!
>
> I keep getting that evil little character ... ^k from mac users (pre X)
> and I need to remove it. Does anyone know how to remove?
>
> This site has that character as a vertical tab. This character is what
> is used in MS Excel when people hit return inside a cell. If they copy
> and paste that into a form its ok, but when I export that data to a csv
> it gets ugly.
>
> http://www.robelle.com/smugbook/ascii.html
>
> Thanks in advance!
>
> Jimmy
>