Does this string mean anything to you? /^(?=.*[a-z])(?=.*[A-Z])(?=.*\W).{8,16}$/
Before I started learning about Regular Expressions, it just looked like a bunch of gibberish to me too!
This is a short tutorial that will hopefully demystify what each part of that expression means. Hopefully by the time you're done reading this tutorial, you'll be able to look at any regex and understand what pattern it's looking for.
note: to practice, click ctr find (windows), or command find (mac) and click on the .*
symbol to use, practice, and see what patterns you're targetting with regex.
Here are a couple quick summaries about each section I'll be going more into:
- Anchors: Learn how to use anchors like ^ and $ to match the start and end of a line.