Insert into acc_books (id, name, db_pref, flag, type, text1, text2, text3, text4, text5, flag1, flag2, flag3, flag4, flag5, remark, data_type, book_year, book_code, area_code, split_str, storage_location, date_stamp, set_year)
Values (2690, 'total budget accounts',' 3799 _01 ', 1, 1, ' ', '1', ' 'and', ', 0, 0, 1, 1, 1, ' 'and', '2016', '371325001 _01', '371325001', '4,2,2,2,2,2,2,2,2,2,2,2,2,2', ' ', to_date (' 2015-09-24 ', 'the dd - mm yyyy hh24: mi: ss'), ");
"" "
String=sub (" (values \ [. \ n] * () (. *) (\);) "R" \ ", SQL)
2Print (string)
The above that match the values I want the content of the parentheses, so I got the three groups, the first group to values (, the second group is the content of the brackets, the third group is);
But the results are:
- acc_books
Insert into acc_books (id, name, db_pref, flag, type, text1, text2, text3, text4, text5, flag1, flag2, flag3, flag4, flag5, remark, data_type, book_year, book_code, area_code, split_str, storage_location, date_stamp, set_year)
2690, 'total budget accounts',' 3799 _01 ', 1, 1, ' ', '1', ' ' ' ', ', 0, 0, 1, 1, 1, ' 'and', '2016', '371325001 _01', '371325001', '4,2,2,2,2,2,2,2,2,2,2,2,2,2', ' ', to_date (' 2015-09-24 ', 'the dd - mm yyyy hh24: mi: ss'), ' '
CodePudding user response:
The import rePrint (re. Search (" (values \ [. \ n] * () (. *) (\);) ", SQL) group (2))
CodePudding user response: