Regular Expressions 101

Community Patterns

Community Library Entry

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 - 2 years ago