Regular Expressions 101

Community Patterns

Find particular punctuation

1

Regular Expression
ECMAScript (JavaScript)

/
(\!{1,})(\?{1,})?|(\?{1,})(\!{1,})?
/
g

Description

This regex find punctuation like "!", "!!!", "?", "???", "!?", "!!!???" and unlimited time repeated "!" and "?"

Submitted by Ivijan-Stefan Stipic - 7 years ago