Dedecms a regular expression that can filter multiple lines of code in a DEDECMS acquisition

Source: Internet
Author: User
In the past with Dede collection, always filter not off more than one line of code, only a row of filtering, on the Internet, found there are many and I like the rookie. With the constant use of Dede acquisition, there is a further understanding of the regular, and now I use a regular expression, the same can match multiple lines of code.
For example, in the following code, filter out a hyperlink with two lines of code.

Xxx
Xxx

Multi-line matching can be achieved with the following filter
{Dede:trim} ([^\n<]*) {/dede:trim}
A sign like this can be used as a newline character, and a \ n represents a newline.
Hope to be useful to beginners Dede.

The above describes the Dedecms acquisition Dedecms collection can filter the regular expression of multiple lines of code, including the content of the Dedecms collection, I hope that the PHP tutorial interested in a friend helpful.

  • 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.