Continue to ask for a PHP regular, you heroes help

Source: Internet
Author: User
When copying articles on the Internet, often the articles are mixed with the following content
(XXX net www.xxx.com)
(XXX net xxx.com)
(XXX net www.xxx.cn)
(XXX net www.xxx.net)
"XXX Net www.xxx.com.cn"
[XXX net www.xxx.cn]
(XXX net xxx.com)

The rule is that the website information is in Chinese () or "" or 〖〗 "" "or English () [].
The content inside is more

To beg for a regular that can delete these


Reply to discussion (solution)

$s =<<
  
  

Upstairs V5, respectable

$s =<<
     
    

$s =<<
       
      

$s =<<
         
        

The Strongman! But
This filter is labeled "", but some "is the normal content of the website propaganda information
So excuse me, how can we filter on the contents of "", including. com. cn. NET?

$s =<<
           
          

The Strongman! But
This filtering is marked with "", but some "is normal content rather than advertising information
So excuse me, how can we filter on the contents of "", including. com. cn. NET?

$p =array (    "/(. +?) ( com|cn|net))/","/". +? (com|cn|net) "/", "/〖.+?" (com|cn|net) 〗/","/". +? (com|cn|net) "/", "/".+? " (com|cn|net) "/", "/\[.+? ( com|cn|net) \]/","/\ (. +? ( com|cn|net)/");

Change it again, this is better:

$p =array (    "/(. +?\. com|cn|net))/","/". +?\. (com|cn|net) "/", "/〖.+?\." (com|cn|net) 〗/","/". +?\. (com|cn|net) "/", "/".+?\. " (com|cn|net) "/", "/\[.+?\. ( com|cn|net) \]/","/\ (. +?\. ( com|cn|net)/");

Change it again, this is better:

$p =array (    "/(. +?\. com|cn|net))/","/". +?\. (com|cn|net) "/", "/〖.+?\." (com|cn|net) 〗/","/". +?\. (com|cn|net) "/", "/".+?\. " (com|cn|net) "/", "/\[.+?\. ( com|cn|net) \]/","/\ (. +?\. ( com|cn|net)/");


Thank God very much.
Want to ask again, how to add a judgment URL, the front is based on. com. cn and other suffixes to judge, how to judge by the prefix www.
Thank the Great God again.

Change it again, this is better:

$p =array (    "/(. +?\. com|cn|net))/","/". +?\. (com|cn|net) "/", "/〖.+?\." (com|cn|net) 〗/","/". +?\. (com|cn|net) "/", "/".+?\. " (com|cn|net) "/", "/\[.+?\. ( com|cn|net) \]/","/\ (. +?\. ( com|cn|net)/");


Want to ask again, how to add a judgment URL, the front is based on. com. cn and other suffixes to judge, how to judge by the prefix www.
Thank the Great God again.
  • 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.