Python Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Python Course
Register
regular expressions
+2
Author: Ahmed Errami
Dark
Public
Save
PY
py
1
2
3
4
5
import
re
haRegex=re.
compile
(
r
'\b(?:ha){3,5}\b'
)
mo=haRegex.findall
(
'haha hahaha hahahaha hahahahaha hahahahahaha'
)
print
(
mo
)
Enter to Rename, Shift+Enter to Preview
OUTPUT