Re: [PHP] Help preg_replace with Non-English character
Just a question, I want to replace some Chinese characters with
preg_replace().
But it does not work.
The string is
$str = 'test<<你好>>http://www.phparch.cn/ 完成';
The ideal output is :
test<a href="http://www.phparch.cn">你好</a> 完成
Any suggestion will be greatly appreciated.
Have a look to see if the mb_* functions will help.
http://uk3.php.net/manual/en/book.mbstring.php
--
Richard Heyes
In Cambridge? Employ me
http://www.phpguru.org/cv
+----------------------------------------+
| Access SSH with a Windows mapped drive |
|
http://www.phpguru.org/sftpdrive |
+----------------------------------------+
.
Relevant Pages
- Help preg_replace with Non-English character
... I want to replace some Chinese characters with ... The string is ... The ideal output is: ... Any suggestion will be greatly appreciated. ... (php.general) - Search function results in program freeze: Word2007
... the document and need to search for a text string. ... This post is a suggestion for Microsoft, ... Agree" button in the message pane. ... (microsoft.public.word.application.errors) - Re: recording Macros
... Just to be sure we are on the same page, and with no attempt to offend if you are in fact familiar with it, the way it works is this: After running the code (in the case of the command button code in the other thread, by clicking the command button), press Ctrl + G to open the VBA editor to the Immediate Window. ... this is your filter string. ... A response from you would have shown ... > Thank you for your suggestion, I will try to be more clear with my ... (microsoft.public.access.gettingstarted) - Re: Why not accept wildcards for REPLACE as well as FIND ?
... replaced by the wildcard characters found in the search string. ... Unfortunately, using this example in the current version of Excel 2007, will ... This post is a suggestion for Microsoft, ... (microsoft.public.excel.misc) - Re: Why not accept wildcards for REPLACE as well as FIND ?
... Select the range of cells to be changed. ... replaced by the wildcard characters found in the search string. ... This post is a suggestion for Microsoft, ... (microsoft.public.excel.misc) |
|