optionally ignore everything after a dash

This commit is contained in:
Erik Krogh Kristensen
2021-11-04 13:19:44 +01:00
parent 523c15cd72
commit a19627c72f
2 changed files with 4 additions and 4 deletions

View File

@@ -89,8 +89,8 @@ abstract class CryptographicAlgorithm extends TCryptographicAlgorithm {
*/
bindingset[name]
predicate matchesName(string name) {
name.toUpperCase().regexpCapture("^(\\w+)(?:-.*)?$", 1).regexpReplaceAll("[-_ ]", "") =
getName()
[name.toUpperCase(), name.toUpperCase().regexpCapture("^(\\w+)(?:-.*)?$", 1)]
.regexpReplaceAll("[-_ ]", "") = getName()
}
/**