Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
(?:\$|\$\$)\S*(?:(?:\s+(?:and|with|a|very|beautiful),?)*\s+(?:Ferrari|BMW|Lamborghini|ship))+
"
gm
Input 1
1
New
I would like to be a $-millionaire with a Ferrari. I would like to be a $$-millionair with a Lamborghini. I would like to be a $$-millionair with a rotten Lamborghini. I would like to be a $$-millionair Ferrari. I would like to be a $-millionaire with a very, very beautiful ship! I would like to be a $-millionaire with a very, very beautiful but a bit dirty ship. I would like to be a $-millionaire with a dog, a cat, two children and a cowboy hat. That would be great. I would like to be a $-millionaire with a Ferrari. -> Match: $-millionaire with a Ferrari I would like to be a $$-millionair with a Lamborghini. -> Match: $$-millionair with a Lamborghini I would like to be a $$-millionair with a rotten Lamborghini. -> No Match because of the word "rotten" I would like to be a $$-millionair with a Lamborghini and a Ferrari. -> Match: $$-millionair with a Lamborghini and a Ferrari I would like to be a $-millionaire with a very, very beautiful ship! -> Match: $-millionaire with a very, very beautiful ship I would like to be a $-millionaire with a very, very beautiful but a bit dirty ship. -> No Match because of the word dirty I would like to be a $-millionaire with a dog, a cat, two children and a cowboy hat. That would be great. -> No Match
Substitution