Home > Backend Development > PHP Tutorial > How to match all

and all tags on the page using regular expressions?

How to match all

and all tags on the page using regular expressions?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-03-02 14:48:01
Original
1829 people have browsed it

How to match all

and all tags on the page with regular expressions?

How to write this regular expression?

Reply content:

How to match all

and all tags on the page with regular expressions?

How to write this regular expression?

<code>/<p(\s[^>]*)?>.*?</p>|<img\s[^>]+>/gis</code>
Copy after login

/<p>[^<]*?</p>|<img [^]*?/>/giIf there is nesting, it cannot be processed.

/<p>.*</p>|<img.+>/gi

Related labels:
php
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template