I expect the following pattern:
pattern1=r"\Ar(evolution)?ide\bthe\b(earth)\Z"
to match:
string=r"ride the earth"
Instead the following pattern is matching:
pattern2=r"r"\Ar(evolution)?ide \bthe\b (earth)\Z"
As \b
is the blank, why isn't pattern 1 matching the string?