We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e22a20 commit c8019a6Copy full SHA for c8019a6
1 file changed
src/main/java/picoded/dstack/mongodb/MongoDB_DataObjectMap.java
@@ -365,9 +365,9 @@ static protected Bson queryObjToBsonFilter(Query inQuery) {
365
String val = GenericConvert.toString(inQuery.defaultArgumentValue());
366
367
// val = val.replaceAll("*", "*");
368
- val = val.replaceAll("*", Pattern.quote("*"));
369
- val = val.replaceAll("%", ".*");
370
- val = val.replaceAll("_", "[.]");
+ val = val.replaceAll("\\*", "*");
+ val = val.replaceAll("\\%", ".*");
+ val = val.replaceAll("\\_", "[.]");
371
372
return Filters.regex(inQuery.fieldName(), "^"+val+"$");
373
}
0 commit comments