Regular Expressions 101

Community Patterns

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 - 2 months ago