Here you can find the source of removeSpecialCharsForSQLRegExp(String _s)
public static String removeSpecialCharsForSQLRegExp(String _s)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { private static ArrayList<String> alReplacements = new ArrayList<String>(); public static String removeSpecialCharsForSQLRegExp(String _s) { String _r = ""; for (int i = 0, m = _s.length(); i < m; i++) { char c = _s.charAt(i); if (false == alReplacements.contains("" + c)) { _r = _r.concat("" + c); }/*w w w . jav a 2 s . c om*/ } return _r; } }