neg_look_ahead

neg_look_ahead(string, A, B)

Negative look ahead will succeed if passed non-consuming expression does not match against the forthcoming input. The syntax is A(?!B) where A is actual expression and B is non-consuming expression.

Parameters

string: str Text selected to apply transformation.

A, B: str A is actual expression and B is non-consuming expression.

Examples:

neg_look_ahead("I love kaggle. I love DL","love","DL")
    >>> position:(2, 6) Matched word:love