does NOT match. However, individually ^dog and dog$ will match dogdogdog. I do not believe the test cases capture this seemingly quirky scenario either.
But I’m stumped trying to mimic grep behavior for ^dog$ with dogdogdog. It does not seem possible by simply checking string “starts with” dog for ^ and “ends with” dog for $. Anyone have any insights on how to think about ^$?