Regular Expressions 101

Community Patterns

Select last symbol in string

1

Regular Expression
PCRE (PHP <7.3)

/
(&mdash;)(?!.*\&mdash;).*
/

Description

This regexp selected random last symbol in string.

Submitted by Folleah - 8 years ago