Skip to content

Commit 3ab8211

Browse files
authored
Update Day6.md
I've added a short solution, using Regular Expression, to the Question 18.
1 parent e6bec94 commit 3ab8211

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Status/Day 6.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,18 @@ for i in s:
153153
print(",".join(lst))
154154
```
155155

156+
**OR**
157+
158+
'''python
159+
import re
160+
161+
a = input('Enter passwords: ').split(',')
162+
pass_pattern = re.compile(r"^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[$#@]).{6,12}$")
163+
for i in a:
164+
if pass_pattern.fullmatch(i):
165+
print(i)
166+
'''
167+
156168
---
157169

158170
# Question 19

0 commit comments

Comments
 (0)