RE: [PHP] color codes
| From: | Mark Charette | Date: | Sat, 12 Apr 2003 03:14:37 +0000 |
| Subject: | RE: [PHP] color codes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143595@lists.php.net to get a copy of this message | ||
> From: John W. Holmes [mailto:holmes072000@charter.net]
> > Is is possible to remove color codes from a string?
> > For example, if i execute a system() or shell_exec($a) using
> > something
> > like "man more" for $a, the result comes with linux color codes. Is it
> > possible to filter those codes so the result displays correctly?
>
> What do the codes look like? You should be able to preg_replace() them
> away...
Or, even simpler, read the man page for man where it shows you how to create
a plain text man page:
pipe the output to "col -b"
Mark C.