Regular Expressions 101

Community Patterns

GET THE USERNAME OF THE EMAIL

1

Regular Expression
PCRE (PHP <7.3)

Description

Recovers the part before @

For example: teste@testregex.com

The regex will catch teste

Submitted by anonymous - 5 years ago