Password Pattern Matching
Let's look at the rules and the conditions needed to solve the problem of password pattern matching.
We'll cover the following...
If you’ve been reading up to this point, hopefully, you’re now used to thinking in RegExp terms, and you now understand the power that regular expressions bring to the table. This is exactly why they’re so widely used in all types of software projects.
In this final chapter, we’ll be showing you a few examples of real-world use cases where regular expressions can help you achieve some very nice functionalities with very few lines of code.
Rules for password
Password pattern matching is probably the easiest use case for regular expressions. After all, password rules tend to be a bit convoluted at times. How many times have you seen a message similar to this when trying to sign up to a website: “Your password needs to be between 6 and 12 characters long and should have, at least, an uppercase letter, a lowercase letter, a symbol, a number, and, ideally, a combination of letters that you’ll never be able to remember by yourself in a million years”?
Granted, that last bit might’ve come ...