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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]