Hi, I'm trying to figure out an appropriate strategy for handling regexps where I need to parse input like the following:
"{ {...} {...} (part I want to match) } more..." ...The catch being that thepart I want to match can contain escaped curly braces, like so: "\{" and "\}" It's not enough to just check for the first ending curly brace, using an expression like this: '/{[^{]*{[^}]+}[^{]*{[^}]+}(.*)}/s' ^^^^ = the part I'd like to match ...because there may be other curly braced content afterwards which should not be matched. Regular expressions seem like they're not suitable for this sort of input parsing, and I'm wondering if there is something else out there, like a generic SAX parser for input other than XML. The input I'm using is coming OS X text resources that are in RTF format, so I guess an RTF parser would work too. Any leads? --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php