RegEx - LogeshVel/learning_resources GitHub Wiki

image

Lookaround

Lookaround - Link

image

image

In Atomic groups the backtracking is disabled that means it checks for the first condition in the string if that fails it will never back and try the second option from the start.

image

image

Here it matches foos but it also should match foots as per the basic regex understanding but due to the atomic group disabled the backtracking its not able to do that. so it failed to match foots once foo match is failed in foots

Non Capturing group

Basically () in regex will group if the match is found. but using (?:) even though the match is found it will not group.

image

image