Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
^(?:(:[a-zA-Z0-9.-]+) )?([a-zA-Z]+|[0-9]+)((?: [a-zA-Z0-9]+)*(?: :.+)?)$
/
gm

Description

  1. prefix (IRC protocol prefix parsing)
  2. command
  3. parameters (IRC protocol arguments parsing)
Submitted by kerosene2000 - 9 years ago