Regular Expressions 101

Community Patterns

0

匹配合法的变量名

Python
\b[a-zA-Z_]\w+
Submitted by anonymous - 4 years ago

IP address a.b.c.d form with range from 0 to 255 for each letters

0

Regular Expression
Python

r"
^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$
"

Description

Loading markdown...
Submitted by Abdulaziz - 8 years ago