Java tutorial
//package com.java2s; public class Main { public static String sqliteEscape(String keyWord) { keyWord = keyWord.replace("/", "//"); keyWord = keyWord.replace("'", "''"); keyWord = keyWord.replace("[", "/["); keyWord = keyWord.replace("]", "/]"); keyWord = keyWord.replace("%", "/%"); keyWord = keyWord.replace("&", "/&"); keyWord = keyWord.replace("_", "/_"); keyWord = keyWord.replace("(", "/("); keyWord = keyWord.replace(")", "/)"); return keyWord; } }