hi folks,

I'm writing an Object Query Language which is pretty simple, you do request
such as
*SELECT e.*,c.firstName *
*FROM employee e *
*JOIN contact c ON e*
*WHERE e.id=*?

(queries don't get much more complicated than that, you have multiple
alias.fieldName in the select, then multiple joins)

I'm trying to find the best way to get all the informations.
At the moment I am doing a preg_match that simply verify that the whole
syntax is good , but to separate all the information i have to separate the
query in sub parts (select, from , join, where) and do a preg_match_all on
them.

So my questions are :
- is there a better way to do this?

- about regular expression : (that would directly solve my problem)
if you do
preg_match('!(([a-z])+)!','abcabc',$matches);
echo '<pre>';print_r($matches);echo '</pre>';
you get only the last letter, is there a way to get all of them ??? (using a
regular expression and only preg_match, no preg_match_all)
http://www.regular-expressions.info/captureall.html

Regards,

JB

Reply via email to