Finding a solution to the problem of high difficulty

Source: Internet
Author: User
Ask for high difficulty regular
A passage, such as:
@abc falieurisdlfalsjdfj alkjdiruasjdflasdfj @abc. UK Salkdjfoawuierj @123,lskdufasjidfja

The above paragraph reads @abc and @abc. UK and @123 instead of taking out the @abc in the CN is just like the one in Weibo, followed by a comma or a period before the sign, but don't involve anything behind the @ in the mailbox.

PHP Code
$s = <<< txt@abc falieurisdlfalsjdfj alkjdiruasjdflasdfj @abc. UK Salkdjfoawuierj @123, Lskdufasjidfjatxt;preg_match_all ("/(?: ^| \s) (@[\w.] +)/is ", $s, $r);p rint_r ($r [1]);
The tin sum teacher's not taking into account this situation.
Just learn the regular, come on a.

PHP Code
Related Article

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