You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Patterns containing embedded NUL bytes are successfully compiled with pcre2_compile when a non-PCRE2_ZERO_TERMINATEDlength argument is provided to pcre2_compile (e.g. for length-counted binary strings).
These same patters do not compile successfully with libfsm, where (currently) RE_EXEOF is returned from re_comp.
This behavior can be tested from the command line with:
$ echo -ne 'a\x00b'| re -l c -k pair -r pcre -y /dev/stdin
/dev/stdin:1: Syntax error: expected EOF
or by invoking re_comp with a custom byte-string iterator that does not return EOF when \0 is encountered in an input pattern.
It would be nice if there was a way to compile byte strings with embedded NUL bytes. Either by matching PCRE2 verbatim, or via an additional fsm_options flag that indicates that binary strings are accepted in PCRE patterns.
The text was updated successfully, but these errors were encountered:
Patterns containing embedded NUL bytes are successfully compiled with
pcre2_compile
when a non-PCRE2_ZERO_TERMINATED
length
argument is provided topcre2_compile
(e.g. for length-counted binary strings).These same patters do not compile successfully with
libfsm
, where (currently)RE_EXEOF
is returned fromre_comp
.This behavior can be tested from the command line with:
or by invoking
re_comp
with a custom byte-string iterator that does not returnEOF
when\0
is encountered in an input pattern.It would be nice if there was a way to compile byte strings with embedded NUL bytes. Either by matching PCRE2 verbatim, or via an additional
fsm_options
flag that indicates that binary strings are accepted in PCRE patterns.The text was updated successfully, but these errors were encountered: