Any OM Pattern Matching Guru's out there? (342 Views)
Reply
Visitor
BDTurner
Posts: 1
Registered: ‎02-09-2012
Message 1 of 3 (342 Views)

Any OM Pattern Matching Guru's out there?

I am in the process of matching patterns for OM policy testing purposes. I've done pretty well but am stuck on a few...

Does anyone have a clue on what would match these three patterns below? All are for UNIX.

 

The pattern matching utility opcpat reports these two patterns contains syntax errors but they are present in policies.

 

\>  <@.user> <#.pid> b

 

<*> \> <*.text> (<*.tmplid>)

 

This one is probably easy but I haven’t yet been able to figure out a match yet that opcpat agrees with.

 

^<@><S><@><S><@><S>0<@><S><@.obj><S><*.msg>

 

Thanks in advance...

Please use plain text.
Honored Contributor
Jeroen Peereboom
Posts: 2,688
Registered: ‎06-26-2003
Message 2 of 3 (335 Views)

Re: Any OM Pattern Matching Guru's out there?

[ Edited ]

L.S.

 

it depends on the definition of the Separator.

Let's assume it is an X.

I added additional escape characters (\) for 'loose' \ and >.

Patternfile:

#
\\\>  <@.user> <#.pid> b
X
<*> \\\> <*.text> (<*.tmplid>)
X
^<@><S><@><S><@><S>0<@><S><@.obj><S><*.msg>
X

 

Valuefile:

>  User 999 b
Some Text > Some more Test (TemplId)
aapXnootXmiesX0someXTheObjectXThe message text

 

 

 

You can check the valuefile against the condition using the admin GUI.

 

 

JP.

 

Please use plain text.
Honored Contributor
Jeroen Peereboom
Posts: 2,688
Registered: ‎06-26-2003
Message 3 of 3 (322 Views)

Re: Any OM Pattern Matching Guru's out there?

Hmm,

 

Conditions in the admin gui show:

<*> \> <*.text> (<*.TmplId>)

\>  User 999 b

 

These pattern matches are shown as follows when you download the logfile template to a file::

                        TEXT "<*> \\> <*.text> (<*.TmplId>)" SEPARATORS "X"
                        TEXT "\\>  User 999 b"

So I have too many backslashes in the patfile Only the \ needs an additional \..

 

JP.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation