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
/
Ben.+(?:banana|apple)
/
gm
Input 1
1
New
"Ben likes bananas" would return positive "Ben eats banana" would return positive "Ben eats apples" would be positive "Ben likes apple" would be positive "Ben likes pears" would be negative because pears was not a specified term. "Tom likes apple" would be negative because Ben is not specified
Extraction
"Ben likes bananas" would return positive "Ben eats banana" would return positive "Ben eats apples" would be positive "Ben likes apple" would be positive "Ben likes pears" would be negative because pears was not a specified term. "Tom likes apple" would be negative because Ben is not specified