move regex tests to test/; make more precise (#47959)
These tests aren't specific to PCRE; no matter how Regex matching is
implemented, these tests should pass, so I'm moving them into
test/regex.jl. I'm also making them more precise and testing that the
match is not only something, but also that it is the exact substring
that should match. Might catch some future PCRE regression.