Regular expression in Python

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

Regular expression in Python
Regular expression in Python
Regular expression in regex.h
python regular expression memo
Start / end match in python regular expression
Use let expression in Python
Python 處 處 regular expression Notes
Use regular expressions in Python
Regular expression manipulation with Python
Regular expression symbolic group name in Python / Ruby
String replacement with Python regular expression
When using regular expressions in Python
Quadtree in Python --2
Python in optimization
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
Geocoding in python
SendKeys in Python
Meta-analysis in Python
Unittest in python
Epoch in Python
Discord in Python
Sudoku in Python
DCI in Python
quicksort in python
nCr in python
Plink in Python
[Python] Regular Expressions Regular Expressions
Constant in python
Lifegame in Python.
FizzBuzz in Python
Sqlite in python
StepAIC in Python
N-gram in python
LINE-Bot [0] in Python
Disassemble in Python
Reflection in Python
Constant in python
nCr in Python.
format in python
Scons in Python3
Puyo Puyo in python
python in virtualenv
PPAP in Python
Reproduce the Python regular expression r'\ w (? U)' in JavaScript
Quad-tree in Python
Reflection in Python
Chemistry in Python
Hashable in python
Regular expression re
DirectLiNGAM in Python
LiNGAM in Python
Flatten in python
flatten in python
Overlapping regular expressions in Python and Java
Use print in a Python2 lambda expression
(Python) HTML reading and regular expression notes
Replace non-ASCII with regular expressions in Python
Don't use \ d in Python 3 regular expressions!
How to use regular expressions in Python