private String fixWildcard(String value){
  if (value.contains("*") && !value.contains(".*")) {
    return value.replace("*",".");
  }
  return value;
}

private String fixWildcard ( String value ) { if ( value . contains ( "*" ) && ! value . contains ( ".*" ) ) { return value . replace ( "*" , "." ) ; } return value ; }
converts user wildcard character ( * ) to regex single character wildcard ( . ) but ignores a regex multi - character wildcard ( . * )
