From 6e6587bdad31fb2575be2680419cc86125339a9d Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Sat, 9 Oct 2021 10:23:28 +0800 Subject: bugfix - rule update failure via GUI Issue-ID: HOLMES-482 Signed-off-by: Guangrong Fu Change-Id: I2a9880c91aac4f3b77d5279b03947c04a46c83d8 --- rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts index e75de3c..93a0662 100644 --- a/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts +++ b/rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts @@ -304,7 +304,7 @@ export class RuleInfo implements OnInit { } replacePkgName (content: string): string { - let reg = /(package\s+[\w\d\.]+)(\s+|;).*/; + let reg = /(package\s+[\w\d\.]+)(\s.|;).*/; let groups = reg.exec(content); let pkgName = groups[1]; if (pkgName == null) { @@ -312,5 +312,4 @@ export class RuleInfo implements OnInit { } return content.replace(pkgName, pkgName + new Date().getTime()); } - } -- cgit 1.2.3-korg