Probably the RE class in gtest is internal to avoid "collisions" with
the RE2 project.
Dirk
As you found out, you cannot count on testing::internal::RE working in
the future.
If you could upgrade to Google Mock, which is a super set of Google
Test, you can use its various matchers, including regular expression
matchers:
http://code.google.com/p/googlemock/wiki/CheatSheet#String_Matchers
Your example will look like
using testing::MatchesRegex;
EXPECT_THAT(teststring, MatchesRegex("SomePrefix.*"));
or
using testing::StartsWith;
EXPECT_THAT(teststring, StartsWith("SomePrefix"));
You don't have to use Google Mock for its mocking ability -- it
contains many goodies for regular testing as well.
--
Zhanyong