hyperscan icon indicating copy to clipboard operation
hyperscan copied to clipboard

Cause of error "Have unordered match in sub-expressions"

Open dchenz opened this issue 2 years ago • 0 comments

Following on from https://github.com/intel/hyperscan/issues/234, except there are a few things I wasn't sure about and would like to understand the issue in more detail.

The error seems to appear when any pattern in a logical combination ends with $, \b. E.g.

[
    {
        "id": 100,
        "expr": "hello",
        "flags": "quiet"
    },
    {
        "id": 101,
        "expr": "world$",
        "flags": "quiet"
    },
    {
        "id": 102,
        "expr": "100 & 101",
        "flags": "combination"
    }
]
  • How does having/not having $ affect the matching done by hyperscan, in terms of offsets and reporting inaccurate results? I saw in https://github.com/intel/hyperscan/issues/325 that matching is done at each offset. Is it due it not being able to determine if the current offset is EOL?
  • What does it mean for a pattern to be "unordered"?

Thanks in advance.

dchenz avatar Jul 04 '23 08:07 dchenz