I have a string
String SQL = "SELECT POSITION('Bengal' IN STRING) from delivery";
I want to replace the POSITION() function from the SQL string with this String INSTR(STRING,'Bengal'). And in the POSITION function of SQL String 'Bengal' and STRING is not a fixed values it will change as per user requirement but POSITION,the open braces "(",IN and closing braces ")" is static. The final out put has to be look like this using Regular Expression.
String SQL ="SELECT INSTR(STRING,'Bengal') from delivery";
So in the string if it repeats two times then it has to replace two time with corresponding arguments into the same string SQL. Any help will be appreciated.