Skip to content

PatternCompiler

Defined in: core/src/detection-engine/compiler.ts:48

new PatternCompiler(defaultTimeoutMs?, maxCacheSize?): PatternCompiler

Defined in: core/src/detection-engine/compiler.ts:53

number = 2000

number = 1000

PatternCompiler

batchCompile(patterns, validate?): Promise<Map<string, RegExp | RE2Instance>>

Defined in: core/src/detection-engine/compiler.ts:201

string[]

boolean = true

Promise<Map<string, RegExp | RE2Instance>>


clearCache(): Promise<void>

Defined in: core/src/detection-engine/compiler.ts:220

Promise<void>


compile(pattern, flags?): Promise<RegExp | RE2Instance>

Defined in: core/src/detection-engine/compiler.ts:67

string

string = 'gi'

Promise<RegExp | RE2Instance>


compileSync(pattern, flags?): RegExp

Defined in: core/src/detection-engine/compiler.ts:101

string

string = 'gi'

RegExp


safeMatch(pattern, content, timeoutMs?): Promise<MatchResult | null>

Defined in: core/src/detection-engine/compiler.ts:105

string

string

number

Promise<MatchResult | null>


validatePatternSafety(pattern, testStrings?): [boolean, string]

Defined in: core/src/detection-engine/compiler.ts:172

string

string[]

[boolean, string]