Ahmet Kilic <ahmedkilic / gmail.com> writes: > "INSERT INTO CBM_CT_BY_CLT ( "\ > " CST_CD, "\ > " BLK_REG_SEQ, "\ > " BLK_REG_DT, "\ > " DEL_FLG "\ > ") "\ > "VALUES ( "\......... > > how can I get the table name(CBM_CT_BY_CLT) and column name ( CST_CD > ..) from this sql script? > It contains spaces and the script is line by line. > I am trying like this but it is no useless > columnname = text.scan(/"\s+(.*?)\s+"\\/) You will have to write a SQL parser. Of course, you may try to do a half-assed job with regular expressions, but SQL is a language with a context-free grammar, so you need a parser. -- __Pascal Bourguignon__