Regular Expressions 101

Community Patterns

Find last occurrence of char in a string

1

Regular Expression
ECMAScript (JavaScript)

/
\.(?=[^.]*$)
/
gm

Description

Find last occurrence of . can be replaced with anything .

Submitted by Volgers - 3 years ago