Regular Expressions 101

Community Patterns

1...34567...881

Username@Hostname:port w capture groups

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^([a-zA-Z0-9]+)@([a-zA-Z0-9.-]+):([0-9]{1,5})$
/
g

Description

used to parse alphanum usernames @ hostnames w portnumbers utilizing capture groups

Submitted by Johnathan Smithers - 3 months ago