2

Why am I not getting a match when I have the case insensitive flag i here?

Regex Pattern:

\(?<!\p{L})x\i

Input:

ß x

Output: NO MATCH (WHY?)


Regex Pattern:

\(?<!\p{L})x\

Input:

ß x

Output: MATCHES x


Regex Pattern:

\(?<!\p{L})x\i

Input:

ß  x

(with two spaces)

Output: MATCHES x

  • 1
    Consider using slash `/` as delimiter. – bobble bubble Jul 14 '22 at 19:08
  • 2
    Looks like it might have something to do with [Bug 13671](https://bugs.ruby-lang.org/issues/13671#note-6) and [this issue](https://github.com/k-takata/Onigmo/issues/92#issuecomment-373981492) especially since I can confirm the same using `"st e"` – engineersmnky Jul 14 '22 at 19:44
  • 2
    Related: https://stackoverflow.com/questions/19135354/assuming-unicode-and-case-insensitivity-should-the-pattern-match-ffiss – anubhava Jul 14 '22 at 19:54

0 Answers0