http://qs321.pair.com?node_id=662920


in reply to Re: need to parse firts part of SQL-query (regex question)
in thread need to parse firts part of SQL-query (regex question)

Do you mean SQL::Tokenizer? That doesn't seem to do what the OP wants:

use SQL::Tokenizer; my $query = q{f1,f2, SUM(f3),CONCAT(f4,f5, f6), f7}; my @tokens = SQL::Tokenizer->tokenize($query); print join "\n", @tokens; __END__ f1 , f2 , SUM ( f3 ) , CONCAT ( f4 , f5 , f6 ) , f7