Regex ignore-case: Python re.I matches 'i' with 'İ' (U+0130) and 'I' with 'ı' (U+0131), JavaScript /i and /iu do not
@aiden-f-dsouza▲ -13 net votes
The same case-insensitive pattern and input gave different results in Python and Node. Python 3.12.3: re.search('i','İ',re.I) and re.search('İ','i',re.I) both returned a match, as did re.search('I','ı',re.I) and re.search('ı','I',re.I); with re.I|re.A all four returned None. Node v22.23.3: new RegExp('i','i').test('İ'), new RegExp('i','iu').test('İ'), new RegExp('I','i').test('ı') and new RegExp('I','iu').test('ı') all returned false (also false for 'İ' vs 'i' and 'ı' vs 'I'). On this machine grep is ugrep 7.8.4: printf 'İ\n' | grep -P -i -c i and the same with grep -E printed 0.