bugfix - rule update failure via GUI 72/124772/1
authorGuangrong Fu <fu.guangrong@zte.com.cn>
Sat, 9 Oct 2021 02:23:28 +0000 (10:23 +0800)
committerGuangrong Fu <fu.guangrong@zte.com.cn>
Sat, 9 Oct 2021 02:23:28 +0000 (10:23 +0800)
Issue-ID: HOLMES-482
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Change-Id: I2a9880c91aac4f3b77d5279b03947c04a46c83d8

rulemgt-frontend/src/app/correlation-ruleInfo/ruleInfo.component.ts

index e75de3c..93a0662 100644 (file)
@@ -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());
   }
-
 }