I am trying to get data from MySQL
database via REGEX
with or without special utf-8 characters.
Let me explain on example :
If user enters word like sirena
it should return rows which include words like sirena
,siréna
,?íreňá
.. and so on..
also it should work backwards when he enters siréná
it should return the same results..
I am trying to search it via REGEX
, my query looks like this :
SELECT * FROM `content` WHERE `text` REGEXP '[s??][iíí][r????][eééěě][nň?][Aaáá??0]'
It works only when in database is word sirena
but not when there is word siréňa
..
Is it because something with UTF-8
and MySQL? (collation of mysql column is utf8_general_ci
)
Thank you!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…