RE: [PHP] Regular Expression
| From: | Andrew Braund | Date: | Wed, 18 Apr 2001 21:23:02 +0000 |
| Subject: | RE: [PHP] Regular Expression | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49273@lists.php.net to get a copy of this message | ||
LinuxSA http://www.linuxsa.org.au/ meeting a couple of
days ago was
on regex, some notes are at;
http://www.fornax.net/regex2/
or part 1 at;
http://www.fornax.net/regex/
HTH
Andrew Braund
> -----Original Message-----
> From: Jeroen Geusebroek [mailto:Jeroen.Geusebroek@intellit.nl]
> Sent: Thursday, 19 April 2001 06:25
> To: php-general@lists.php.net
> Subject: Re: [PHP] Regular Expression
>
>
>
> >oops. The expression should read '/\[([^\]]+)\]/'
>
> Thanks all, i used this code and it works:
>
> preg_match("/\[(.+)\]/",$msg_array[$i],$segments);
> $title = trim($segments[1]);
> $description = ereg_replace("\[ $title \]", "",
> $msg_array[$i]);
>
> Does anyone know a good regex tutorial? I'll probably bump
> into it again.
> Regex'es seem to be very usefull.
>
> Regards,
>
> Jeroen Geusebroek