Home  >  Article  >  Backend Development  >  PHP regular method to filter pictures in articles

PHP regular method to filter pictures in articles

WBOY
WBOYOriginal
2016-07-25 09:00:091158browse
  1. $txt="Programmer's Home_bbs.it-home.org";

  2. $pattern='//';
  3. $str="Replace with blank";
  4. $txt =preg_replace($pattern,$str,$txt);

  5. $str = preg_replace('~~s','',$str) ; //$str is the content of the article to be filtered.

  6. ?>

Copy the code

The above is the content of this php tutorial, once again feel the powerful power of php regularity.



Statement:
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