Re: Regular Expression
| From: | Wico de Leeuw | Date: | Wed, 18 Apr 2001 12:11:58 +0000 |
| Subject: | Re: Regular Expression | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49193@lists.php.net to get a copy of this message | ||
At 13:39 18-4-2001 +0200, Jeroen Geusebroek wrote:
Hi, I have question about regular expressions; I don't know anything about it and was wondering if someone could help me out. I have this text: "[ this is atest ] and this is the rest of the text"$data = "[ this is a test ] and this is the rest of the text" if (preg_match('"\[([^\]]+)\]"', $data, $match)) {
var_dump($match[1])}
I want to get the text inbetween the [ and ]. If someone could help me out, i would appreciate it. A link to a tuturial would also be nice. Regards, Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net