k-takata / Onigmo

Onigmo is a regular expressions library forked from Oniguruma.
Other
617 stars 94 forks source link

(?i) not works properly #120

Closed tengattack closed 5 years ago

tengattack commented 5 years ago

onig_search failed to match such pattern:

pattern: (?i) *(TOOKY)[ _\-]([^;/]+) ?(?:Build|;) cannot match Mozilla/5.0 (Linux; Android 4.0.3; TOOKY A9PLUS Build/IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19 but can match Mozilla/5.0 (Linux; U; Android 2.3.4; Zh-tw; TOOKY A9 Build/GRJ22) AppleWebKit/533.1 (KHTML, Like Gecko) Version/4.0 Mobile Safari/533.1

tengattack commented 5 years ago

BTW, I'm using ONIG_ENCODING_UTF8 which caused this problem, and if I change to ONIG_ENCODING_ASCII there is no problem.

k-takata commented 5 years ago

I found that #113 was broken. I will make a fix.