For more information about regular expressions, refer to the email address and the name after Registrant: in the previous article, but there are many different situations. ask how to write a regular expression.

Source: Internet
Author: User
The regex problem is that the email address and the name after Registrant are intercepted in the following article, but there are many different situations. how can I write a regular expression? Scenario 1: Registrant: & nbsp; jinmi & nbsp; jinmi8 & nbsp; shenzhen, the question of gu regular expression is that the mailbox in the following article and the name of Registrant: Are there many different situations. how can I write a regular expression?
Case 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 [email protected]

Jin mi 8

Shen zhen, guang dong 518000

China

+ 86.13510187966


Technical Contact:

Mi, jin [email protected]

Jin mi 8

Shen zhen, guang dong 518000

China

+ 86.13510187966
Case 2:
Registrant:

Domain Administrator

Netease.com, Inc

No. 16, Ke Yun Rd Tianhe District

GuangZhou GuangDong 510665

CN

[Email protected] + 86.2085106370 Fax: + 86.2085106370


Case 3:
Registrant:

Zhiyong Duan

Beijing Baidu Netcom Science Technology Co., Ltd.

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

Beijing 100085

CN

[Email protected] + 86.1059924216 Fax: + 86.1059927435




------ Solution --------------------
PHP code
// Name preg_match_all ('/Registrant: \ s * (\ w + \ s + \ w +)/S', $ str, $ name ); print_r ($ name [1]); // email preg_match_all ('/\ B [\ w _] + @ [\ w \. _] +/M', $ str, $ email); print_r ($ email );

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.