Here you can find the source of cleanStringByLikeWithHSQL(String input)
public static String cleanStringByLikeWithHSQL(String input)
//package com.java2s; //License from project: Open Source License public class Main { public static String cleanStringByLikeWithHSQL(String input) { if (input == null) { return ""; }/* www .j a v a 2 s . c o m*/ input = input.replaceAll("\\\\", "\\\\\\\\\\\\\\\\"); input = input.replaceAll("'", "''"); input = input.replaceAll("%", "\\\\\\\\%"); input = input.replaceAll("_", "\\\\\\\\_"); return input; } }