Posted By

teloon on 02/01/10


Tagged

re


Versions (?)

remove chinese space


 / Published in: PHP
 

URL: http://sandacn.blog.163.com/blog/static/891102009622642066/

  1. //(\xc2\xa0) is the unicode of chinese space
  2. $new['content'] = preg_replace('/^[(\xc2\xa0)|\s]+/', '', $new['content']);
  3.  
  4. //the space after "|" is full-shaped space
  5. re = "[\s| ]+"

Report this snippet  

You need to login to post a comment.