I have a string something like -> <[TIT2]> ABC <[TPE1]> GHI <[TALB]> XYZ Im applying a regex as such -> // Title/Songname/Content preg_match('/<\[TIT2\]>(.*?)(<\[)?/', $foo, $match); $title = trim( $match[1] );
The above regex doesn't work. At the end of the pattern Im using (<\[)?
The pattern may or may not end with <[
For example searching for -> <[TALB]> XYZ
The string, is *NOT* expected to hold a certain order as how it is retrieved.
How does one go about to fix up this regex?
Thanks
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php