Error: "Caught complexity error The complexity of matching the regular expression exceeded predefined bounds"
search cancel

Error: "Caught complexity error The complexity of matching the regular expression exceeded predefined bounds"

book

Article ID: 382969

calendar_today

Updated On: 11-27-2024

Products

Data Loss Prevention

Issue/Introduction

You have applied a policy with a regex to the agent and the policy isn't working as expected 

Environment

DLP 16.X 

Windows Endpoints 

Cause

The regex in question is too complex for the endpoint agent which will impact endpoint performance if it would run, the endpoint agent logs will show the below:

xx/xx/xxxx 13:08:48 |  8508 | SEVERE  | MatcherCore.RegexDetection | Caught complexity error The complexity of matching the regular expression exceeded predefined bounds.  Try refactoring the regular expression to make each choice made by the state machine unambiguous.  This exception is thrown to prevent "eternal" matches that take an indefinite period time to locate. during match (check policy regex's for backtracking!!) regex <REGEX with Complexity concern will be displayed here> | C:\VontuDev\workDir\MatcherCore\MatcherCoreLib\BoostRegexMatcher.h(140)

Resolution

Rework the regex and lessen the complexity, this will resolve the above error in the logs