PHP regular method to filter pictures in articles

WBOY
Release: 2016-07-25 09:00:09
Original
1164 people have browsed it
  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.



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