Fixed re tests incorrectly ported from 2.x to 3.x.
Use more appropriate asserts in re tests.