Home >Backend Development >PHP Tutorial > 再请问一个正则表达式

再请问一个正则表达式

WBOY
WBOYOriginal
2016-06-13 13:19:24956browse

再请教一个正则表达式!
下面的字段,怎么才能截取到Steven Liu,而不要后面的stevenliu@reemake.com呢?这个问题是面向一类字段的!
Registrant [3451728]:

  Steven Liu stevenliu@reemake.com

  Beijing Chuangrui wenhua chuangmei youxian gongsi


------解决方案--------------------
preg_match_all('#Registrant \[3451728\]:\s+(\w+\s+\w+)#s',$s,$m);
print_r($m);

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn