Guy I have a list of string.
Select
id AS "cusId ",
name as 'cusName', gendar as ' Gendar.',
isPaid as " is'Paid ", total, remarks FROM
I need a regex that returns:
Select
id
name
gendar
isPaid
total
remarks
FROM
And also ignore comma and 'AS' keyword.
So far from PHP I can use preg_match_all('/(?<![\S"])([^"\'\s]+)(?![\S"])/')
and filter all query keywords later on, but came to JavaScript there is no lookbehind in regex.