본문 바로가기

Web_Application/C#

[regex][mssql] INSERT | INSERT INTO



expression

/(INSERT+?(INTO|)\s+(.*?)|)SELECT\s+(.*?)\s*FROM\s+(.*?)\s*(WITH|)\(NOLOCK\)\s(WHERE\s(.*)\s*)?/g

matches

X - INSERT TPE_40C
X - INSERT #TPE_40C
O - INSERT TPE_40C SELECT C_COA FROM TPP_10C AS D WITH(NOLOCK) WHERE 1=1 AND C_COA = 1 GROUP BY C_COA
O - INSERT INTO TPE_40C SELECT C_COA FROM TPP_10C AS D WITH(NOLOCK) WHERE 1=1 AND C_COA = 1 GROUP BY C_COA

demo link
https://regexr.com/44ndb


'Web_Application > C#' 카테고리의 다른 글

[c#][winform] To Set Maximize / Minimize Button Enable/Disable  (0) 2019.04.17
[regex][mssql] INSERT SELECT, SELECT  (0) 2018.12.14
[regex][mssql] CRATE TABLE  (0) 2018.12.14
[regex][mssql] CREATE INDEX  (0) 2018.12.14
[regex][c#] new line  (0) 2018.12.14