Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
(a+)(.*)(\1)
/
g

Description

Remove the last repetition of a on texts like:

a b c d a e f g

Submitted by Icaruk - 2 years ago