Regular related questions, intercept the above article in the mailbox and registrant: After the name, but there are a lot of different situations, ask the regular expression how to write

Source: Internet
Author: User
Regular problem, intercept the following article in the mailbox and registrant: After the name, but there are a lot of different situations, how to write the regular expression?
Scenario 1:
Registrant:

Jin mi

Jin Mi 8

Shen Zhen, Guang Dong 518000

China


Registered through:GoDaddy.com, LLC (http://www.godaddy.com)

Domain name:760pk.com

Created on:04-may-12

Expires on:04-may-13

Last Updated on:28-jun-12


Administrative Contact:

Mi, Jin linliangemail@qq.com

Jin Mi 8

Shen Zhen, Guang Dong 518000

China

+86.13510187966


Technical Contact:

Mi, Jin linliangemail@qq.com

Jin Mi 8

Shen Zhen, Guang Dong 518000

China

+86.13510187966
Scenario 2:
Registrant:

Domain Administrator

Netease.com, Inc.

No.16, Ke Yun Rd Tianhe District

GuangZhou Guangdong 510665

CN

nsadmin@corp.netease.com +86.2085106370 传真: +86.2085106370


Scenario 3:
Registrant:

Zhiyong Duan

Beijing Baidu netcom Science Technology Co., Ltd.

3F Baidu Campus No.10 shangdi 10th Street Haidian District

Beijing Beijing 100085

CN

domainmaster@baidu.com +86.1059924216 传真: +86.1059927435




------Solution--------------------
PHP code
//name Preg_match_all ('/registrant:\s* (\w+\s+\w+)/s ') , $str, $name); Print_r ($name [1]);//Mailbox Preg_match_all ('/\b[\w_]+@[\w\._]+/m ', $str, $email); Print_r ($email); 
  • 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: 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.