Re: Regular expression question

From: Date: Thu, 27 May 2004 18:18:38 +0000
Subject: Re: Regular expression question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187071@lists.php.net to get a copy of this message
This should work:
^\\         # Don't match if a backslash precedes
\[          # Open bracket
([^\]]+?) # Text, including whitespace
\]          # Close bracket
By the way, using a tool called The Regex Coach I solved your problem in about 10 seconds. For those having regex problems you might be interested in this link, I have found this tool invaluable: http://www.weitz.de/regex-coach/#install

« previous php.general (#187071) next »