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
Set in: Oniguruma, PosixExtended, GnuRegex, Java, Perl, Perl_NG, Ruby
This flag specifies how to handle operators like ? and * when they aren't
directly attached to an operand, as in ^* or (*): Are they an error, are
they discarded, or are they taken as literals? If this flag is clear, they
are taken as literals; otherwise, the ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS flag
determines if they are errors or if they are discarded.
Since this flag isn't set for "grep", I used the sample.c example changing the syntax to ONIG_SYNTAX_GREP and the str to (UChar* )"*zzzzaffffffffb" (note the initial asterisk).
For a pattern of * or \\(*\\), the first character matches (as expected).
For a pattern of ^*, I get "ERROR: target of repeat operator is invalid", despite this being exactly the example regular expression in the documentation saying the asterisk should be treated as a literal.
The text was updated successfully, but these errors were encountered:
docs/SYNTAX.md
has this to say about ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS:Since this flag isn't set for "grep", I used the sample.c example changing the syntax to
ONIG_SYNTAX_GREP
and thestr
to(UChar* )"*zzzzaffffffffb"
(note the initial asterisk).For a pattern of
*
or\\(*\\)
, the first character matches (as expected).For a pattern of
^*
, I get "ERROR: target of repeat operator is invalid", despite this being exactly the example regular expression in the documentation saying the asterisk should be treated as a literal.The text was updated successfully, but these errors were encountered: