Â
You will learn about zero-width assertions in Java regular expressions. We will cover various zero-width assertions and their usage patterns. We will then move on to learn the important topic of lookahead and lookbehind assertions in Java regular expressions and how to use them to solve some important problems. We will also discuss the use of atomic groups in Java regular expressions.
We will cover the following topics in this chapter:
- Zero-width assertions
- Previous match boundary
- Atomic groups
- Lookahead assertions: positive and negative
- Lookbehind assertions: positive and negative
- Capturing text from overlapping matches
- Capturing groups inside lookahead and lookbehind groups
- Lookbehind limitations in Java regular expressions