Regular Expressions 101

Community Patterns

Character Match Replace + Capturing Group

0

Regular Expression
PCRE (PHP <7.3)

Description

s matches the character s literally (case sensitive)

1st Capturing Group (\d) \d matches a digit (equivalent to [0-9])

Global pattern flags g modifier: global. All matches (don't return after first match) m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)

Submitted by Dan - 3 years ago