On Wednesday 18 April 2001 17:07, you wrote: > On Wednesday 18 April 2001 13:39, you wrote: > > I have this text: > > > > "[ this is atest ] and this is the rest of the text" > > > > I want to get the text inbetween the [ and ]. > > if (preg_match ('/\[([^\]])\]/', $Subject, $Matches)) { > echo "Found it : '" . $Matches [1] . "'"; > } Ooops. The expression should read '/\[([^\]]+)\]/' -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Even idiots can handle computers, and many do. -- 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] regular expression Fai
- Re: [PHP] regular expression Christian Reiniger
- [PHP] REGULAR EXPRESSION kaab kaoutar
- Re: [PHP] REGULAR EXPRESSION Richard Lynch
- [PHP] Regular Expression Jeroen Geusebroek
- Re: [PHP] Regular Expression Wico de Leeuw
- Re: [PHP] Regular Expression Christian Reiniger
- Re: [PHP] Regular Expression Christian Reiniger
- Re: [PHP] Regular Expression Jeroen Geusebroek
- RE: [PHP] Regular Expression Andrew Braund
- Re: [PHP] Regular Expression Martín Marqués
- Re: [PHP] Regular Expression Christian Reiniger
- [PHP] regular expression Galkov Vladimir
- [PHP] Re: regular expression liljim
- [PHP] Re: regular expression liljim
- [PHP] Re: regular expression liljim
- Re: [PHP] regular expression Christian Reiniger
- Re: [PHP] regular expression DL Neil