Expose FilteredRE2::GetRE2() as public.

Change-Id: Id40f0e46365b12f321e1591f679ad2ad63030f0c
Reviewed-on: https://code-review.googlesource.com/c/re2/+/42010
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/re2/filtered_re2.h b/re2/filtered_re2.h
index 965b5c9..4118acc 100644
--- a/re2/filtered_re2.h
+++ b/re2/filtered_re2.h
@@ -80,11 +80,10 @@
   // The number of regexps added.
   int NumRegexps() const { return static_cast<int>(re2_vec_.size()); }
 
+  // Get the individual RE2 objects.
+  const RE2& GetRE2(int regexpid) const { return *re2_vec_[regexpid]; }
+
  private:
-
-  // Get the individual RE2 objects. Useful for testing.
-  RE2* GetRE2(int regexpid) const { return re2_vec_[regexpid]; }
-
   // Print prefilter.
   void PrintPrefilter(int regexpid);