Let’s keep this simple.
Lookarounds can be nested, and lookbehinds can generally only be of a fixed length.
Where available, you can use lookarounds with
grep -P. The
-o flag will only output the match, instead of the full matching line.