From c17c980e72d4e3ad4a088c0f002cd1433bf04251 Mon Sep 17 00:00:00 2001 From: Sebastian Eicke Date: Tue, 3 Sep 2024 12:27:04 +0200 Subject: [PATCH] Fix RegExp for checking semanticId --- aas-web-ui/src/mixins/SubmodelElementHandling.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aas-web-ui/src/mixins/SubmodelElementHandling.ts b/aas-web-ui/src/mixins/SubmodelElementHandling.ts index 49838670..c19150a6 100644 --- a/aas-web-ui/src/mixins/SubmodelElementHandling.ts +++ b/aas-web-ui/src/mixins/SubmodelElementHandling.ts @@ -119,14 +119,14 @@ export default defineComponent({ for (const key of submodelElement.semanticId.keys) { if (key.value.startsWith('http://') || key.value.startsWith('https://')) { // e.g. IDTA IRI like - if (new RegExp('/d/d/{0,1}' + '$').test(semanticId)) { + if (new RegExp(/\/\d\/\d\/{1}/).test(semanticId)) { if (key.value === semanticId) return true; } else { if (key.value.startsWith(semanticId)) return true; } } else if (key.value.startsWith('0173-1')) { // ECLASS IRDI like 0173-1#01-AHF578#001 resp. 0173-1-01-AHF578-001 - if (new RegExp('[#-]{1}d{3}$').test(semanticId)) { + if (new RegExp(/[#-]{1}d{3}$/).test(semanticId)) { // ECLASS IRDI with version (like 0173-1#01-AHF578#001 resp. 0173-1-01-AHF578-001) if (key.value === semanticId) return true; } else {