Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class
287 views

Script Monitor Match Expression

I have a script that outputs:

Label1:value1
Label2:value2
Label3:value3
.
.

I entered in Match value labels field: Label1:,Label2:,Label3:
I entered Match expression: /.*Label1:(.*)\nLabel2:(.*)\nLabel3:(.*)/

 

It works fine and I can set thresholds for each label. The issue happens when script output inserts an entry in between as shown below:

Label1:value1
Label2:value2
Label4:value4
Label3:value3
.
.

I get an error Content Match Error. 

Labels (3)
0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

Hello Sitescoper,

Hope you are fine,

Could you please try to set up the regular expression similar to below example***:

Detail from your side:

I have a script that outputs:

Label1:value1
Label2:value2
Label3:value3
.
I entered in Match value labels field: Label1:,Label2:,Label3:
I entered Match expression: /.*Label1:(.*)\nLabel2:(.*)\nLabel3:(.*)/

 Recommendation:

***Regex:  /(Label1:(.*))|(Label2:(.*))|(Label3:(.*))/

Try to include the "|" / OR operator in the regular expresion and check the outcomes,

 

Regards,

Miguel Torres

Miguel Torres
Micro Focus SW Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

[Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.]
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.