OsakaWebbie
Programmer
I have UTF-8 strings with square-bracketed bits interspersed, and some of the text (outside the brackets) is Japanese. Here is an example:
If I apply the following:
...I end up with "世めていス" instead of the expected "世界中を治めている主イエス".
Experimentation has shown me that, at least for the strings I've looked at so far, using ereg_replace() instead of mb_ereg_replace() gives the correct answer. But why? I would have thought the exact opposite.
Code:
世[C]界中[G]を治[C]めてい[D]る主イエ[G]ス
Code:
mb_ereg_replace("\[[^\[]*\]","",$stanza)
Experimentation has shown me that, at least for the strings I've looked at so far, using ereg_replace() instead of mb_ereg_replace() gives the correct answer. But why? I would have thought the exact opposite.