Highlighted
Trusted Contributor.
Trusted Contributor.
665 views

Regular Expression for a new CI Attribute created with an Enrichment Rule

Jump to solution

I am trying to pull data from a Process CI's attribute "Process Parameter" attribute, below is an example of this attribute:

-classpath /opt/progress/dlc115/jdk/lib/tools.jar:/opt/progress/dlc115/java/progress.jar:/opt/progress/dlc115/java/messages.jar:/opt/progress/dlc115/java/prosp.jar /ssii_db/prod/jns/db/WINTER -n 170 -B 65536 -B2 65536 -L 131072 -basetable 1 -tablerangesize 1250 -baseindex 1 -indexrangesize 3500 -maxAreas 128 -Mxs 2048

I am trying to pull the bolded text from the above line. This can be any 3 or 4 word characters and the location in the line is not always the same.  The only constant is that the bolded section will always come before "/db/WINTER".

I tried the following Regular Expression (which works in my Regular Expression testing area)  

\w{3,4}(?=\/db\/WINTER)

But uCMDB does not seem to like the positive lookahead [?=] to just grab the first 3-4 word charaters before /db/WINTER.

Is there a document anyones knows of that covers the supported Regular Expressions within uCMDB or does anyone have any ideas of a regular expression uCMDB would support that might work to just pull that bolded section in the Process Paramater attribute?

Thanks,

Kent.  

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Regular Expression for a new CI Attribute created with an Enrichment Rule

Jump to solution

I just wanted to update this thread with a solution I used.

I could not find a Regular Expression to give me what I wanted so I ended up doing it in multiple steps.

  1. As part of the Enrichment Mode I pulled out the "jns/db/WINTER" and stored it into an attribute not used for the Process CI
  2. Then as part of the Enrichment mode rule to create the new Business Application CI, I used another Regular Expression to pull out the "jns" from the attribute updated in step 1 and concatenated it will some more data to give the name of the new Business Application CI I wanted

It's not a single step but it used simpler Regular Expressions in both cases that uCMDB supported and allowed me to create the new CI we were looking for.

If your interested the Regular Expression for step 1 was "\w{3,4}\/db\/WINTER" and the Regular Expression for step 2 was "\b(\w{3,4})\b"

View solution in original post

0 Likes
2 Replies
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: Regular Expression for a new CI Attribute created with an Enrichment Rule

Jump to solution

I just wanted to update this thread with a solution I used.

I could not find a Regular Expression to give me what I wanted so I ended up doing it in multiple steps.

  1. As part of the Enrichment Mode I pulled out the "jns/db/WINTER" and stored it into an attribute not used for the Process CI
  2. Then as part of the Enrichment mode rule to create the new Business Application CI, I used another Regular Expression to pull out the "jns" from the attribute updated in step 1 and concatenated it will some more data to give the name of the new Business Application CI I wanted

It's not a single step but it used simpler Regular Expressions in both cases that uCMDB supported and allowed me to create the new CI we were looking for.

If your interested the Regular Expression for step 1 was "\w{3,4}\/db\/WINTER" and the Regular Expression for step 2 was "\b(\w{3,4})\b"

View solution in original post

0 Likes
Frequent Contributor.
Frequent Contributor.

Re: Regular Expression for a new CI Attribute created with an Enrichment Rule

Jump to solution

So the challenge I have been facing is what does look like in the UCMDB pane used for enrichment rule updates.  IF you could take a screen shot of the regular expression in the UCMDB enrichment rule, that would help me understand how to apply the regular expression to the UCMDB context.

 

thanks

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.