现在有这样的一段代码:
sbSQL.append( "INSERT INTO PUB_FEATURE VALUES (");
sbSQL.append(rs.getInt( "FEATURE_ID")).append( ",");
sbSQL.append(rs.getInt( "CLASS_GROUP_ID")).append( ",");
sbSQL.append( "'" + rs.getString( "CODE") + "'").append( ",");
sbSQL.append( "'" + rs.getString( "NAME") + "'").append( ",");

sbSQL.append( "'" + rs.getString( "ALIAS_NAME") + "'").append( ",");

sbSQL.append( "'" + rs.getString( "DATA_TYPE") + "'").append( ",");

sbSQL.append(rs.getInt( "DATA_LENGTH")).append( ",");
sbSQL.append(rs.getInt( "DATA_PRECISION")).append( ",");
sbSQL.append( "'" + rs.getString( "UNITS") + "'").append( ",");
sbSQL.append( "'" + rs.getString( "DESCRIPTION") + "'").append( ",");
sbSQL.append( "'" + rs.getString( "DICTIONARY_ID") + "'").append( ",");
现在需要将形如下面的字符串:
"'" + rs.getString("DICTIONARY_ID") + "'"
替换成:getString("DICTIONARY_ID")
则对应的正则匹配可以如下:
FIND:
"'" \+ rs\.getString\("(.+)"\) \+ "'"
REPLCAE WITH:
getString("\1")