From: Projit Roy Date: Thu, 10 Nov 2022 05:57:15 +0000 (+0530) Subject: SDNR GUI always says 'Input is wrong.' for leaves with type 'inet:ip-address' Saving... X-Git-Tag: 1.5.0~4^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=e8d608b2c0246620f83c1d084ffeccb03d2e0fdc;p=ccsdk%2Ffeatures.git SDNR GUI always says 'Input is wrong.' for leaves with type 'inet:ip-address' Saving the data works just fine Issue-ID: CCSDK-3800 Signed-off-by: Projit Roy Change-Id: I5433f5a3bd4e8a41f023d0ad12223e98d9624100 --- diff --git a/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts b/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts index 965935a5c..74e346e86 100644 --- a/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts +++ b/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts @@ -1049,7 +1049,7 @@ export class YangParser { }; const extractPattern = (): Expression | undefined => { - const pattern = this.extractNodes(this.extractNodes(cur, "type")[0]!, "pattern").map(p => p.arg!).filter(p => !!p).map(p => `^${p}$`); + const pattern = this.extractNodes(this.extractNodes(cur, "type")[0]!, "pattern").map(p => p.arg!).filter(p => !!p).map(p => `^${p.replace(/(?:\\(.))/g, '$1')}$`); return pattern && pattern.length == 1 ? new RegExp(pattern[0]) : pattern && pattern.length > 1