static String cleanRegexpTerm(final String value) {
        if (value != null) {
            return value.replaceAll("([\\\\\\.\\[\\{\\(\\)\\*\\+\\?\\^\\$\\|])", "\\\\$1");
        } else {
            return value;
        }
    }
Cleans the passed string by escaping all characters deemed special in a MySQL REGEXP expression
stroom-statistics/stroom-statistics-impl-sql/src/main/java/stroom/statistics/impl/sql/SQLSafe.java