Skip to content

Commit 19f7c06

Browse files
committed
Fixing regex matching rules
1 parent 247e060 commit 19f7c06

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/picoded/dstack/mongodb/MongoDB_DataObjectMap.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,9 @@ static protected Bson queryObjToBsonFilter(Query inQuery) {
365365
String val = GenericConvert.toString(inQuery.defaultArgumentValue());
366366

367367
// val = val.replaceAll("*", "*");
368-
val = val.replaceAll("\\*", "*");
368+
val = val.replaceAll("\\*", "\\*");
369369
val = val.replaceAll("\\%", ".*");
370-
val = val.replaceAll("\\_", "[.]");
370+
val = val.replaceAll("\\_", ".");
371371

372372
return Filters.regex(inQuery.fieldName(), "^"+val+"$");
373373
}

0 commit comments

Comments
 (0)