Experts help you to see how to write this regular expression

Source: Internet
Author: User
How can I write this regular expression? & Lt; span & gt; & nbsp; & lt; p & gt; content 1 & lt;/p & gt; & nbsp; & lt; palign = & quot; center & quot; & gt; content 2 & lt;/p & gt; & nbsp; & lt; pstyle = & quo experts help me see how to write this regular expression?

Content 1


Content 2


Content 3



Use php Delete, and

Change
, Which must be processed together with <>. After completion, it should be

Content 1

Content 2

Content 3


You cannot delete the regular expressions you have written. you don't know what's going on.

------ Solution --------------------
PHP code
$ Str ="

Content 1

Content 2

内容3

";//自己稍微查下正则的高级用法吧 你匹配不出来估计是对正则贪婪模式不理解echo preg_replace('/ (. *) <\/P>/I ',' \ 1
', $ Str );

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.