Skip to content

Instantly share code, notes, and snippets.

@imaz
Created August 1, 2011 03:01
Show Gist options
  • Save imaz/1117502 to your computer and use it in GitHub Desktop.
Save imaz/1117502 to your computer and use it in GitHub Desktop.
正規表現(regular expression)
/* ★SELECT|★FROM|★WHERE|★GROUP BY|★ORDER BY|★UNION */
/* SELECT ★ */
/* column_alias,★ */
/* table_alias,★ */
/* ★(!BETWEEN)AND */
--before
(?=SELECT)|(?=FROM)|(?=WHERE)|(?=GROUP\sBY)|(?=ORDER\sBY)|(?=UNION)
(?<=SELECT\s)
(?<=AS\s(\w\d)+,)
(?<=\) (\w|\d)+,)
(?<!BETWEEN\s(\w|\d)+\s)(?=AND)
--after
\n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment