private void regexMetaChar(boolean useBindPrms) throws Exception {
    Cache cache = CacheUtils.getCache();
    AttributesFactory attributesFactory = new AttributesFactory();
    RegionAttributes regionAttributes = attributesFactory.create();

    Region region = cache.createRegion("pos", regionAttributes);

    String[] values = new String[] {"active", "act**ve", "ac+t+ve", "?act?ve", "act)ve^",
        "|+act(ve", "act*+|ve", "^+act.ve+^", "act[]ve", "act][ve", "act^[a-z]ve", "act/ve",
        "inactive", "acxtxve", "ac(tiv)e", "act()ive", "act{}ive", "act{ive"};

    // Add values to region.
    for (int i = 0; i < values.length; i++) {
      region.put(i, values[i]);
    }

    // Add % and _ with escape char.
    region.put(values.length + 1, "act%+ive");
    region.put(values.length + 2, "act_+ive");

    QueryService qs = cache.getQueryService();
    Query q;
    SelectResults results;

    for (final String s : values) {
      if (!useBindPrms) {
        q = qs.newQuery(
            "select p from " + SEPARATOR + "pos.values p where p like '" + s + "'");
        results = (SelectResults) q.execute();
      } else {
        q = qs.newQuery("select p from " + SEPARATOR + "pos.values p where p like $1");
        results = (SelectResults) q.execute(new Object[] {s});
      }
      List r = results.asList();
      if (r.size() != 1 || !r.get(0).equals(s)) {
        fail("Unexpected result. expected :" + s + " for the like predicate: " + s
            + " found : " + (r.size() == 1 ? r.get(0) : "Result size not equal to 1"));
      }
    }

    // Create Index
    qs.createIndex("p", IndexType.FUNCTIONAL, "p", SEPARATOR + "pos.values p");

    for (final String value : values) {
      if (!useBindPrms) {
        q = qs.newQuery(
            "select p from " + SEPARATOR + "pos.values p where p like '" + value + "'");
        results = (SelectResults) q.execute();
      } else {
        q = qs.newQuery("select p from " + SEPARATOR + "pos.values p where p like $1");
        results = (SelectResults) q.execute(new Object[] {value});
      }
      List r = results.asList();
      if (r.size() != 1 || !r.get(0).equals(value)) {
        fail("Unexpected result. expected :" + value + " for the like predicate: " + value
            + " found : " + (r.size() == 1 ? r.get(0) : "Result size not equal to 1"));
      }
    }
  }
Tests for regular expression meta chars. This has no special meaning with Like.
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/LikePredicateJUnitTest.java