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
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php