Fix regexp matches so that regexp is always on the left

Whenever a match is done against a string, it usually doesn't matter
whether it's string =~ regexp or regexp =~ string.  But if a match is
done against, say, an instance of Pathname, then regexp =~ pathname will
fail because there is no Pathname#=~ method defined.

I figured it would be simplest and most consistent always to put the
regexp on the left.