Skip to content

Commit

Permalink
Anchor the regex
Browse files Browse the repository at this point in the history
  • Loading branch information
droberts195 committed Feb 21, 2024
1 parent 4ed38eb commit d77c307
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final class ModelState {
*/
public static final String TYPE = "model_state";

private static final Pattern V_5_4_DOC_ID_SUFFIX_REGEX = Pattern.compile("\\d{10}#\\d+");
private static final Pattern V_5_4_DOC_ID_SUFFIX_REGEX = Pattern.compile("^\\d{10}#\\d+$");

public static String documentId(String jobId, String snapshotId, int docNum) {
return jobId + "_" + TYPE + "_" + snapshotId + "#" + docNum;
Expand Down

0 comments on commit d77c307

Please sign in to comment.