I think this tutorial explains what exactly "independent, non-capturing group" or "Atomic Grouping" is
The regular expression a(bc|b)c
(capturing group) matches abcc and abc. The regex a(?>bc|b)c
(atomic group) matches abcc but not abc.
When applied to abc, both regexes will match a
to a, bc
to bc, and then c
will fail to match at the end of the string. Here their paths diverge. The regex with the capturing group has remembered a backtracking position for the alternation. The group will give up its match, b
then matches b and c
matches c. Match found!
The regex with the atomic group, however, exited from an atomic group after bc
was matched. At that point, all backtracking positions for tokens inside the group are discarded. In this example, the alternation's option to try b
at the second position in the string is discarded. As a result, when c
fails, the regex engine has no alternatives left to try.