我有很多带有 SQL 查询的源代码,如下所示:
c_query := "SELECT * FROM TABLE WHERE FIELD_NAME_ONE[2] = 'AB' AND FIELD_NAME_TWO[1,8] = 'ABCDEFGH'"
我想匹配这些:FIELD_NAME_ONE[2]
并且FIELD_NAME_TWO[1,8]
必须在双引号 ( "
) 之间找到这些模式。
编辑
c_query := "SELECT * FROM WHERE FIELD_NAME_ONE[2] = 'AB' AND FIELD_NAME_TWO[1,8] = 'ABCDEFGH' AND TESTE[9] = 'XXXXXXXXX' AND FOO = '" + is_an_array[2] + "' "
它不应该匹配 is_an_array[2] 因为不在双引号内。