feature: case-insensitive match - #15
Conversation
|
Is there an internal syntax for pcre that enable case-less matching (i.e., mapping to |
|
I believe pcre does have a syntax for case-less matching: |
|
Yes, I agree the option for setting global flags is useful. I would prefer something that can accumulate more flags (and is standard). Maybe the (standard, iirc) For the local flag, yes, just nesting |
|
I also think it would be good to have a syntax which allows accumulating more flags, link anchored and multiline, but where could |
The flags are generally placed at the end of the regex (think Perl regexes), but for Perl and others we must have a delimiter in the beginning as well. PCRE (the C lib) doesn't use this syntax but PCRE wrappers like PHP's |
|
Ok, I was thinking of a global option, contemplating Maybe we can use a syntax which does not clash with any valid pattern. According to the pcrepattern man page, I looks like the syntaxes |
|
I found precedence for a caseless in-expression syntax in the Mozilla regular expression modifier documentation: where flags1 and flags2 are include and exclude lists of |
|
Sorry for the late response. |
|
Nice that you already used this syntax. I think we can manage to parse multiple option if we need to. I was contemplating whether we could use |
Related to #12
This PR adds a new extension,
%pcre_i, for case-insensitive match.Note
This updates the opam package to use
ppxlib <= "0.35.0"only, asppxlib.0.36.0has breaking changes in the Parsetree AST.