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
/
^(?:[^$\r\n]*\$[^$\r\n]*){2}$
/
gm
Input 1
New
Home$Fruits Home$Fruits$Apple Home$Fruits$Apple$Red-Apple Home$Fruits$Apple$Green-Apple Home$Fruits$Banana$Yellow-Banana Home$Fruits$Banana$Green-Banana Home$Fruits$Orange