The first metacharacter we'll see is |
/cat|dog/
How does this match cat?
START |c a t | |c a t c |c a t Yes! a <c|a t Yes! t <c a|t Yes! END <c a t> Yes!
We reached END, so the match succeeds