Positive lookbehind

A positive lookbehind assertion asserts true if the pattern inside the lookbehind is matched.

Here is its syntax:

(?<=...) 

For example, (?<=##)\d+ asserts that there must be a ## string just before matching one or more digits.

Get Java 9 Regular Expressions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.