Umut Derbentoğlu
Umut Derbentoğlu

Reputation: 1196

Javascript Regex Issue Turkish Character

I am trying to add searching feature to my list pages. I implement search function on client side with javascript. But I have a problem with only one turkish character "İ". It doesn't work case insensitive search with regex. For example ^(?=.*?ŞAHİN).*$/i expression can not find "şahin" or vice versa. Other turkish characters work properly. How can I fix this?

Upvotes: 1

Views: 995

Answers (1)

Cerbrus
Cerbrus

Reputation: 72927

Try:

^(?=.*?ŞAH[İi]N).*$/i

It's a bit of a hack, but it should work...

Upvotes: 3

Related Questions