Skip to content

Commit

Permalink
Fix regex in constraint format check
Browse files Browse the repository at this point in the history
  • Loading branch information
KostasTsiounis committed Jan 20, 2025
1 parent dac2870 commit 16753cc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ private void setConstraints(String providerName, String providerInfo, boolean pr
final String typeRE = "\\w+";
final String algoRE = "[A-Za-z0-9./_-]+";
final String attrRE = "[A-Za-z0-9=*|.:]+";
final String consRE = "\\{(" + typeRE + "),(" + algoRE + "),(" + attrRE + ")(,\\s+\".+?\")*\\}";
final String consRE = "\\{(" + typeRE + "),(" + algoRE + "),(" + attrRE + ")(,\".+?\")?\\}";
p = Pattern.compile(
"\\["
+ "([+-]?)" // option to append or remove
Expand Down Expand Up @@ -1805,6 +1805,7 @@ private static void checkProviderFormat(String providerInfo, boolean update) {
+ "(\\[" // constraints [optional]
+ "\\s*"
+ "([+-])?" // action [optional]
+ "\\s*"
+ "\\{.+?\\}" // constraint definition
+ "\\])?"
+ "\\s*"
Expand Down

0 comments on commit 16753cc

Please sign in to comment.