Regular Expressions 101

Community Patterns

Laughter

0

Regular Expression
ECMAScript (JavaScript)

/
\b([aei]*h*[aei]+h[haei]+|[aei]*y*[aei]+y[yaei]*|o?l+o+l+[ol]*)\b
/
gm

Description

Matches all laughter like:

  • hahahahhhahahahha
  • hahha
  • ahah
  • lol
  • lolollolll
  • hehehhe
  • hihiihih
Submitted by Prozilla - 10 months ago