'Unexpected regex results with polytonic Greek capitals

I am trying to select only capital letters in polytonic Greek text using regex. The specific application is PHP, but I had trouble with it so I started playing around with it in RegExr:

https://regexr.com/6ellt

([Α-ΩΗΙΟΥΩᾼῌῼΡΆΈΉΊΌΎΏᾺῈῊῚῸῪῺἈἘἨἸὈὨᾈᾘᾨἌἜἬἼὌὬᾌᾜᾬἊἚἪἺὊὪᾊᾚᾪἎἮἾὮᾎᾞᾮἉἙἩἹὉὙὩᾉᾙᾩῬἍἝἭἽὍὝὭᾍᾝᾭἋἛἫἻὋὛὫᾋᾛᾫἏἯἿὟὯᾏᾟᾯΪΫᾹῙῩᾸῘῨ])

When the JavaScript engine is selected, the behaviour is as expected. However, if I select PCRE not only are capital letters selected, but also a bunch of seemingly random lowercase letters.

Can anyone shed some light on what is going on here? Is this a bug? Is there a way to get the desired result using the PCRE engine?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source