factor out assertRegexpMatches, which doesn't exist in 2.6