Re: regex
| From: | Christian Reiniger | Date: | Fri, 16 Feb 2001 13:20:06 +0000 |
| Subject: | Re: regex | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40138@lists.php.net to get a copy of this message | ||
On Thursday 15 February 2001 22:43, Jerry Lake wrote:
> is there a way I can make a regex to add a comma
> to the beginning of every line of a comma delimited
> file ?
$NewContent = preg_replace ('/^(.)/m', ',\\1', $OldContent);
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
What luck for the rulers that men do not think.
- Adolf Hitler