I just stuck at this and cannot find solution.
I would like to try to transform a string to lower case using preg_replace
.
I just cannot create the right regex.
The reason is that normal strtolower
does not support unicode characters.
I know that I could use mb_strtolower
but this function seems to be quite slow and beside them not everyone has MB support.
Any clue?
Regards, Radek
EDIT: Ok, thanks alot for your help guys. I think my approach was not quite correct. I think it would be much better to use this: How do I detect non-ASCII characters in a string? and then respectively use either the strtolower or mb_strtolower if available.