Re: Regular Expression

From: Date: Wed, 18 Apr 2001 20:55:12 +0000
Subject: Re: Regular Expression
Groups: php.general 
Request: Send a blank email to php-general+get-49266@lists.php.net to get a copy of this message
>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

« previous php.general (#49266) next »