Php regular match or str_replace how to replace the English degree symbol

Source: Internet
Author: User
How does php regular expression match or str_replace replace the English degree symbol? I want to convert the English & nbsp; degree & nbsp; special symbol into "". I have never been able to write it properly. Does anyone know? Thank you for your help !, $ Str = "dfdfsdsf ° zgy ° php regular expression matching or str_replace how to replace the English degree symbol?
I want to convert the special English level symbol into "". I haven't made a good decision on how to write it. Does anyone know? Thank you for your help!
------ Solution --------------------
$ Str = "dfdfsdsf ° zgy ° 90 ° ";
Echo str_replace ('°', '', $ str )."
";
Echo preg_replace ('/(°) +/', '', $ str );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.