Regular Expressions 101

Community Patterns

Extract strings between 2 delimiters

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<=,|\t)(.*?)(?=,|\n)
/
mg

Description

Extract strings between a delimiter (",") or between a tabulation and a cr

Example : toto@gmail.com,yoda@testmail.fr,foo@dugenou.com

This expression will return bold e-mails

Submitted by anonymous - 2 years ago