Regular Expressions 101

Community Patterns

Simple digit removal

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<=_)(\d+$)
/
gm

Description

A simple expression for removing digits from the suffix of a string.

Submitted by Seth F. - a year ago