intel / intel/hyperscan

Can parameters limitPatternLength and limitLiteralCount be increased?

Open
#429 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
816
Avg merge
4d 21h
Merged PRs (30d)
2

Description

i prepare to use hyperscan to match patterns like:
1) .*abc{dict1}abc
2) .*123{dict2}123

dict1 and dict2 are big string set (stored in file), like:
dict1:
jack
rose
mike
...

dict2:
tom
jerry
lily
...

i transform my patterns by expanding strings of dict as:
1) .*abc(jack|rose|mike|...)abc
2) .*123(tom|jerry|lily)123

because dict1 and dict2 is so large (>20MB)
so transformed pattern is too large, so hyperscan raise error:
"Pattern length exceeds limit"

beloved source code is :
https://github.com/intel/hyperscan/blob/master/src/hs.cpp#L538
https://github.com/intel/hyperscan/blob/master/src/grey.cpp#L148

so can parameters limitPatternLength and limitLiteralCount be increased to match a large pattern with a dict?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.