Open urmel1960 opened 4 years ago
Hi @urmel1960,
\N
is currently not supported by Hyperscan.
\N
is not frequently used and matches anything except newline which is identical to .
. The only difference is that \N
ignores /s
modifier. You may consider to replace it with .
if possible.
We will think about adding the support in next release.
Thanks, Xiang
Hi @xiangwang1
Thanks for the explanation. Is there a documentation in which the syntax and its exceptions are described?
Thanks
Although it doesn't mention \N
support, please check it out at http://intel.github.io/hyperscan/dev-reference/compilation.html#pattern-support.
Hi @xiangwang1 May I ask an addition question related to this?
are forward slashes supported within hyperscan?
e.g. /regexpattern/
No, same as PCRE library, Hyperscan doesn't support it.
Hi @xiangwang1
Meanwhile I do have another question related to hyperscan syntax.
Does hyperscan support lookbehind ?
Thanks for your support in advance
Hi there
According the hyperscan website hyperscan follows the regular expression syntax of the PCRE library. The regex
\N\.rocks
is causing an error in rspamd which is using hyperscan.The regex
\N\.rocks
is PCRE compliant according to several check in documentation: Match any single character that is NOT a line break character (line feed) «\N» Match the character “.” literally «.» Match the character string “rocks” literally (case sensitive) «rocks»But I still get the following error with that RE:
cannot create tree of regexp when processing '\\N\\.rocks': '\\N' at index 0 not supported.
Can anyone help with getting the proper syntax for this RE?
Thanks in advance