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
/
^(?!fruits).*$|((?<count>\d{1,})\s(?<fruit>\w{1,}))
/
igm
Input 1
New
fruits 5 apples, 2 oranges, 3 bananas, cars 3 toyota, 4 benz, 1 trabi buses 3 toyota, 4 benz, 1 trabi fruits 5 apples, 2 oranges, 3 bananas,