Support re2 == 2023-06-02 (#16257)
### Description
google/re2 [was
switched](https://github.com/google/re2/commit/49d776b9d29d79b6e2876d5f091d2207d8123dfa)
to absl::string_view in version 2023-06-02.
As `absl::string_view` is a drop-in replacement for `std::string_view`
it does not have `as_string()` method.
This PR ensures the forward compatibility with the newest versions of
re2 library.