Re: regex help
| From: | Christian Reiniger | Date: | Fri, 23 Feb 2001 18:58:14 +0000 |
| Subject: | Re: regex help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41354@lists.php.net to get a copy of this message | ||
On Friday 23 February 2001 19:33, John Vanderbeck wrote:
> I need to take a string and remove everything from the first "<"
> character to the end of the line. I'm pretty sure I could do this with
> an ereg_replace(), but I am horrible at regular expressions. Could
> anyone help me with this?
Well, I prefer preg_* :)
$mystring = preg_replace ('/<.*/', '', $mystring);
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
..10001000110101011010101101011110111010113...????