Regular Expressions 101

Community Patterns

REMOVE LAST DIGITS

1

Regular Expression
PCRE (PHP <7.3)

/
(.*)(?=\w{4})
/
gm

Description

Removes the last 4 digits from a expression

Submitted by anonymous - 5 years ago