O'Reilly logo

Java 9 Regular Expressions by Anubhava Srivastava

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we learned zero-width assertions and how they are crucial for solving some important matching problems. We discussed the boundary matcher, \G, and its usefulness in solving some problems. We discovered the idea behind atomic groups and understood how they can improve the overall regex performance. Then, we covered all the important lookahead and lookbehind patterns. We covered some interesting matching, validation, and splitting problems that are solved using lookarounds.

In the next chapter, we will continue to learn advanced concepts of Java regular expressions, such as union and intersection within character classes, and negated character classes.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required