Regular expressions are fun. There are two important concepts that are quite often sought for. Find something based on content that follows our search pattern . OR. Find something based on content that lies ahead. Let's see some examples to see what I mean.
LOOK AHEAD
LOOK AHEAD means , I want to see what lies ahead first, and then decide, to do something now.
Syntax of regex pattern: pattern1(?=pattern2)