July 2017
Beginner to intermediate
486 pages
13h 49m
English
Negative lookbehind matches the string which is definitely not preceded by the pattern which we have defined in the regex pattern part.
Let's see an example to understand the negative lookbehind:
The syntax of negative lookbehind is (?<!pattern)
The regex r(?<!play)ground matches ground, but only if it is not preceded by play.
You can see the code snippet which is an implementation of advanceregex() in Figure 4.17:

Read now
Unlock full access