Developing a recursive command parser
| From: | Straps | Date: | Sat, 14 Jun 2008 08:04:29 +0000 |
| Subject: | Developing a recursive command parser | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-275386@lists.php.net to get a copy of this message | ||
Hi all, i'm trying to develop an application able to interpret
commands loaded from a database or any other source similiar to this
$strParam = 'title=%SESSION(sessionvar)'
or a more complicated
$strParam = 'title=%SESSION(sessionvar_%COOKIE(mycookievar))'
What I need, is to find any special command starting width a
configurable special char (% in this case), get the text inside it and
elaborate it...
The final result could be a simple string like these
$strParam = 'title=My Session Title'
and
$strParam = 'title=My Session and Koookie Value'
I'm starting to working on it, do you know if is there a way to
accomplish to this using PCRE or if there is something just developed?
Thanks, Straps