I am trying to get data from a MySQL via REGEX with or without special utf-8 characters.
Let me explain with an example:
If the user enters a word like sirena , he should return strings that include words like sirena , siréna , šíreňá .. and so on .. also he should work in the opposite direction, when he enters siréná , he should return the same results.
I am trying to search through REGEX , my query looks like this:
SELECT * FROM `content` WHERE `text` REGEXP '[sšŠ][iíÍ][rŕŔřŘ][eéÉěĚ][nňŇ][AaáÁäÄ0]'
It works only when the word sirena is in the database, but not when there is the word siréňa ..
Is it because of something with UTF-8 and MySQL? (mysql utf8_general_ci column utf8_general_ci )
Thanks!
regex mysql utf-8
Maarty
source share