hi,
I'm trying to build a regex that catches everything between a FROM and WHERE of a sql clause (ie, the tables)
EX: select * from t1, t2,t3, t4 x where ...
i need the "t1, t2,t3, t4 x"
i've tried several stuff and end up with this
FROM\s+(?<tables>\w+\s*[,]?\s*)*(WHERE){0,1}
but in <tables> value i get "WHERE"
also the expression also matches the FROM and WHERE words, and i only need the tables.
thanks in advance
I'm trying to build a regex that catches everything between a FROM and WHERE of a sql clause (ie, the tables)
EX: select * from t1, t2,t3, t4 x where ...
i need the "t1, t2,t3, t4 x"
i've tried several stuff and end up with this
FROM\s+(?<tables>\w+\s*[,]?\s*)*(WHERE){0,1}
but in <tables> value i get "WHERE"
also the expression also matches the FROM and WHERE words, and i only need the tables.
thanks in advance