The source code is as follows.
import re
string = "0"
result = re.fullmatch(r'0|1|2', string)
if result:
print("Match!")
else:
print("Not Match")
The execution result is as follows.
Match!
Thank you for reading until the end. Let's meet again.
Recommended Posts