Re: Need help with ereg regular expression
| From: | Richard Lynch | Date: | Wed, 02 Feb 2005 20:13:11 +0000 |
| Subject: | Re: Need help with ereg regular expression | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207929@lists.php.net to get a copy of this message | ||
KHS wrote:
> Richard Lynch wrote:
>
>>KHS wrote:
>>
>>
>>
>>>Here is an example of the input:
>>>#include FT_FREETYPE_H
>>>#include <stdio.h>
>>>#include "freetype/freetype.h"
Perhaps:
<?php
$text = trim(str_replace("#include", "", $text));
preg_match('[<"]?(.*)[>"]?', $text, $answer);
echo $answer[1];
?>
--
Like Music?
http://l-i-e.com/artists.htm