Propably easy regex question
| From: | Nicklas af Ekenstam | Date: | Tue, 24 Jul 2001 21:23:15 +0000 |
| Subject: | Propably easy regex question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-59438@lists.php.net to get a copy of this message | ||
Hi
Could anyone help me with a code snippet that would take a string and add '>
' to it at the start of every new line just as a mail client does when
replying to a mail?
I.e. I would like this:
Hello,
How are you?
To look like this:
> Hello,
>
> How are you?
When it's done.
(Actually I would love it if it would also look for existing > at the
beginning of a line, and if there are any, just add the > and not the white
space but perhaps thats too much to ask for ;-)
Thanks!
- Nille