মেটা ক্যারেক্টার
import re
pattern = r"gr.y"
if re.match(pattern, "grey"):
print("Match 1")
if re.match(pattern, "gray"):
print("Match 2")
if re.match(pattern, "blue"):
print("Match 3")Match 1
Match 2Last updated
import re
pattern = r"gr.y"
if re.match(pattern, "grey"):
print("Match 1")
if re.match(pattern, "gray"):
print("Match 2")
if re.match(pattern, "blue"):
print("Match 3")Match 1
Match 2Last updated
import re
pattern = r"^wr.te$"
if re.match(pattern, "write"):
print("Match 1")
if re.match(pattern, "wrote"):
print("Match 2")
if re.match(pattern, "writer"):
print("Match 3")Match 1
Match 2