+ 2

Can I add minimum requirements by using Regx?

I am trying to solve password validator problem for that I want to take minimum two special symbols as input from user.

26th Oct 2020, 6:14 AM
Vaibhav
Vaibhav - avatar
8 Answers
+ 1
I think I got it. By using this '{2, }' I can add minimum requirements of 2 for special symbols. If something is wrong, correct me Thank you 🙌🙌
26th Oct 2020, 8:03 AM
Vaibhav
Vaibhav - avatar
+ 2
Do the input symbols have to make up a particular complex pattern? If so, regex would probably be the way. However, if only their number is relevant, I would first try to make it work without regex.
26th Oct 2020, 7:26 AM
Lisa
Lisa - avatar
+ 1
Frogged I want to use minimum requirement for only special symbols not for other characters, integers.
26th Oct 2020, 6:48 AM
Vaibhav
Vaibhav - avatar
+ 1
Vaibhav Kale it is correct if it works. For next post: maybe an example will bring light into what u finally want. Anyway..nice question..
26th Oct 2020, 11:38 AM
Oma Falk
Oma Falk - avatar
0
It is possible with regex but A = input() If len(A)<2:
26th Oct 2020, 6:44 AM
Oma Falk
Oma Falk - avatar
0
Import re re.match("[#$%^&*].*[#$%^&*]",input()))
26th Oct 2020, 7:22 AM
Oma Falk
Oma Falk - avatar
0
Lisa I need pattern
26th Oct 2020, 7:40 AM
Vaibhav
Vaibhav - avatar
0
Frogged OK I will remember it. I just want hint for that problem , after sometime I updated that question also. But still I know it is incomplete.
26th Oct 2020, 12:00 PM
Vaibhav
Vaibhav - avatar