Chapter 4. Regex in Practice
In the previous two chapters, we covered Regex's syntax in depth, and at this point, have all the pieces required to build a real-world project, which will be the goal of this chapter.
Knowing Regex's syntax allows you to model text patterns, but sometimes coming up with a good reliable pattern can be more difficult, so taking a look at some actual use cases can really help you learn some common design patterns.
So, in this chapter, we will develop a form, and we will explore the following topics:
- Validating a name
- Validating e-mails
- Validating a Twitter username
- Validating passwords
- Validating URLs
- Manipulating text