Home > Backend Development > PHP Tutorial > 请教这个字符串里的空白字符是什么编码? 用"s"替换不了

请教这个字符串里的空白字符是什么编码? 用"s"替换不了

WBOY
Release: 2016-06-13 11:26:12
Original
870 people have browsed it

请问这个字符串里的空白字符是什么编码? 用"\s"替换不了
测试代码:
$url = 'http://www.google.com/ig/calculator?hl=en&q=1USD=?tzs';
$str = @file_get_contents( $url );
$str = preg_replace("/[\s\v\t\r\n ]+/", "", $str);
echo "str:$str";

输出结果中,"1 631.32137Tanzanianshillings"最前面的“1”之后的那个空白字符老去不掉。

还请懂的朋友指点一下啊,谢谢!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template