Skip to content

Commit d45452b

Browse files
committed
add re_demo3.py
1 parent b3fc5fd commit d45452b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

regular_expression/re_demo3.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import re
2+
3+
# https://regex101.com/
4+
pattern = re.compile(r"[A-Za-z0-9$%#@]{7,}[0-9]")
5+
mystring = 'accd1234'
6+
7+
a = pattern.fullmatch(mystring)
8+
print (a)

0 commit comments

Comments
 (0)