MatchesRegularExpression Max Length?

I'm creating an event log rule and filtering based on a MatchesRegularExpression expression.  The regex string is a little long since it needs to find specific non-repeating text.  When the total regex length is 170 chars, the match works as expected.  When I edit the regex to 171+ chars the expression errors out and this event appears in the opsmgr log on the agent machine.  "The Microsoft Operations Manager Expression Filter Module could not parse a regular expression provided for filtering. " 

My question is if this is a true limitation of Expression Filter Module, if there is documentation supporting it, and if the max length is something that that can be configured on the agent, maybe with a registry change.

August 28th, 2015 9:51am

Hi Sir,

"

  • Create the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\v3\Modules\Global\ExpressionFilter
  • Underneath this subkey, create a DWORD value.
  • Type the following name for the DWord value: MaxExpressionDepth

"

https://support.microsoft.com/en-us/kb/3004791

Hope it is helpful to you .

Best Regards,

Elton Ji

Free Windows Admin Tool Kit Click here and download it now
September 6th, 2015 6:19am

Hi Elton,

I have run into that problem before for the article that you referenced but I do not believe these are the same problems. The issue I'm running into now does not have a problem with the content of the alert, only with the size of regular expression used.

Thanks,
J

September 8th, 2015 6:11pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics