Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?<match_this>b\s+(?:\S+\s+){1,3}f)|(?<not_overlap1><not-overlap1>d\s+(?:\S+\s+){1,4}g)|(?<not_overlap2>c\s+(?:\S+\s+){1,4}e)
/
g
Input 1
1
New
a b c d e f c g e b c f d g
Extraction
a b c d e f c g e b c f d g