The regular expression contains an unspecified Perl extension error.

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

The regular expression contains an unspecified Perl extension error.

Post by Debugger » Mon May 06, 2019 5:07 pm

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: 10
Joined: Sat Apr 11, 2020 2:45 pm
Location: OrionCygnusArm, MilkyWay

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

Post by RegexNinja » Fri May 08, 2020 11:07 pm

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