Slightly OT, but
It is rather easy to recognize a start of an SQL-StatementIs it? Here are some random snippets from past code I've written.
orselect max(prod_id) from product where effdt = (select max(effdt) from product)
How many statements was that? In fact it's two, but if you just count keywords, you'll get four.insert order (prod_id, prod_cnt) select prod_id, count(*) from product group by prod_id
The point is not to underestimate the tasks that faces the OP. Trying to make it work by just matching keywords gets the wrong answer against normal, everyday SQL very easily. SQL has a definite grammar that's precise, but it's not easy to parse thru. Additional difficulty comes from recognizing all the vendor-specific extensions to the language, but let's not go into that. :-)
In reply to Re^2: create a perl script for pattern matching
by VSarkiss
in thread create a perl script for pattern matching
by MelaOS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |