Search

4/09/2008

"[\x00-\xff]"是表示單字節字符,"[^\x00-\xff]"是表示雙字節字符

"[\x00-\xff]"是表示單字節字符,"[^\x00-\xff]"是表示雙字節字符

>>> a = '中文'
>>> a.replace(/[^\x00-\xff]/g,'@')
>>> "@@"

沒有留言: