forked from intel/hyperscan
-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
Regex: \x{ff15}\x{ff10}\x{ff17}\x{ff15}\x{ff10}[\x{ff10}-\x{ff19}]{7}
Input string: 507507832401
Matches in regex101, but does not match with vectorscan.
Step to reproduce:
TEST(utf8, charclass) {
vector<pattern> patterns;
patterns.push_back(pattern(R"(\x{ff15}\x{ff10}\x{ff17}\x{ff15}\x{ff10}[\x{ff10}-\x{ff19}]{7})", HS_FLAG_DOTALL | HS_FLAG_PREFILTER | HS_FLAG_MULTILINE | HS_FLAG_CASELESS | HS_FLAG_UCP | HS_FLAG_UTF8, 1));
const char *data = "507507832401";
hs_database_t *db = buildDB(patterns, HS_MODE_NOSTREAM);
ASSERT_NE(nullptr, db);
hs_scratch_t *scratch = nullptr;
hs_error_t err = hs_alloc_scratch(db, &scratch);
ASSERT_EQ(HS_SUCCESS, err);
CallBackContext c;
err = hs_scan(db, data, strlen(data), 0, scratch, record_cb,
(void *)&c);
ASSERT_EQ(HS_SUCCESS, err);
EXPECT_EQ(1, countMatchesById(c.matches, 1));
err = hs_free_scratch(scratch);
ASSERT_EQ(HS_SUCCESS, err);
hs_free_database(db);
}
It fails when I run it locally (MacOS M1).
skysmith-proofpoint
Metadata
Metadata
Assignees
Labels
No labels