Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(\n)?(?=(^\N+$)(?(1)|(\n?)))(?:\2\3(?=.*?^\2$)|((?<=(?=$\N|^\2$).))\2\3)
/
gmis
Test String
New
bob sally george bob george bob sally diego dianora diego oh look at my beatiful beautiful beauiful beatiful REGEX IT'S REGEX TASTIC REGEX IS BEATIFUL beautifuyl
Extraction
Processing...