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
/
I am (?:\d+) years old
/
gm
Input 1
1
New
ex1: I am * years old valid matches: - "I am 24 years old" invalid match: - "I am years old" ex2: what color is [my|your|his|her|its|our|their] (red|blue|green|yellow) * valid matches: - "what color is his dog" - "what color is my some random text till the end of string" ex3: [*] told me to say * valid matches: - "Bob and Alice told me to say hallelujah" - "told me to say by nobody"
Substitution
ex1: I am * years old valid matches: - "I am 24 years old" invalid match: - "I am years old" ex2: what color is [my|your|his|her|its|our|their] (red|blue|green|yellow) * valid matches: - "what color is his dog" - "what color is my some random text till the end of string" ex3: [*] told me to say * valid matches: - "Bob and Alice told me to say hallelujah" - "told me to say by nobody"