The regular expression contains an unspecified Perl extension error.

Off-topic posts of interest to the "Everything" community.
Post Reply
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

The regular expression contains an unspecified Perl extension error.

Post by Debugger »

The regular expression contains an unspecified Perl extension error. Any idea?
(?i)(?u)[\x{0419}\x{0041}]


and incorrect pattern
[\x{0419}\x{0041}]\u
[\x{0419}\x{0041}]\l
RegexNinja
Posts: 18
Joined: Sat Apr 11, 2020 2:45 pm

Re: The regular expression contains an unspecified Perl extension error.

Post by RegexNinja »

Hi.. Unfortunately (?u) is not a valid Perl extension for either PCRE or PCRE2.
But the format: \x{###} suffices for matching unicodes (leading 0's can be omitted).

Same thing with \u for uppers-only and \l for lowers-only (neither PCRE/PCRE2).
But you can always use (?-i) to terminate (?i)'s case-insensitivity.
Cheers!
Post Reply