Summary
In this chapter, we discussed composite and inner character classes. We found out how we can use the union, intersection, and subtraction operations to combine simple character classes and make a completely different character class to suit our requirements. You learned some good usage patterns of composite character classes for solving tricky problems. Note how we could avoid more complex lookahead and lookbehind assertions by using the union and intersection of character classes.
In the next chapter, we will discuss the pitfalls of some poorly written regular expressions, and you will learn ways to avoid them. You will also learn some important optimizing tips and performance improvement methods for writing complex regular expressions. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access