Evaluate a php regular expression

Source: Internet
Author: User
Some text may be {code ...} it may also be {code ...} that is, & amp; lt; td & amp; gt; the front may be & amp; lt; br & amp; gt; or not, if the minimum range of the regular expression is used to match the two fields at the same time (this parameter cannot be used. *?) A text segment may be

/34-Cosplayer">Cosplayer
bala balab a la

Or it may be

/34-Cosplayer">Cosplayer
bala ba la ba la

That isThere may be
Or none. if the minimum range of the regular expression is used to match the two fields at the same time (.*?)

Reply content:

A text segment may be

/34-Cosplayer">Cosplayer
bala balab a la

Or it may be

/34-Cosplayer">Cosplayer
bala ba la ba la

That isThere may be
Or none. if the minimum range of the regular expression is used to match the two fields at the same time (.*?)

/34-Cosplayer">Cosplayer
[^<]+(
)?

This is generally the case. I don't know much about flavor of PHP regular expressions.

$a = explode('/34-CosPlayer">CosPlayer', $html);$b = explode('', $a[1]);echo $b[0];

I don't want to use regular expression parsing anymore. it's quite convenient to use explode directly... It is too inconvenient to use Pad to code... ===

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.