How do I remove text URLs from the document content?

Source: Internet
Author: User
How do I remove text URLs from the document content? How does php remove text URLs from the document content? It is not a hyperlink, but text, and the URL of the URL is not fixed.


Reply to discussion (solution)

Match the regular expression first, and then delete it.
You can directly use preg_repalce ("rule", ''); replacing it with null is equivalent to deleting it.

It is not easy to understand. it is best to give an example.

Write a regular rule that matches different URLs. replace the regular rule. The key is to give an example.

Use regular expressions to filter the data and the data is cleared.

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.