Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
^(.*?)\bdefault\b
/
gm

Description

Match only first occurrence of word in a line.

Submitted by Vivek Shah - 8 years ago