Examples/Module: dplreplace (example 4)

Example
Replaces "a" with "A" if there is an "r" somewhere after the "a", and also replaces the "r" at the end of/outside the found group(s) with "_r_".

Matches, with the group match in : "a(b)r", "a(kadab)r".