小编pop*_*ter的帖子

如何在PHP中或使用正则表达式拆分名称和电子邮件地址

我有以下字符串:

"Test, User" < test@test.com >, "Another, Test" < another@test.com >, .........
Run Code Online (Sandbox Code Playgroud)

我想要以下结果:

array(
  array('name' => 'Test, User', 'email' => 'test@test.com'),
  array('name' => 'Another, Test', 'email' => 'another@test.com'),  
  ...........
) 
Run Code Online (Sandbox Code Playgroud)

php regex

0
推荐指数
1
解决办法
3584
查看次数

标签 统计

php ×1

regex ×1