| 1731 | |
| 1732 | template <typename OutValue, typename... Ignored> |
| 1733 | OutValue Call(KernelContext*, std::string_view val, Status*) const { |
| 1734 | re2::StringPiece piece(val.data(), val.length()); |
| 1735 | re2::StringPiece match; |
| 1736 | if (RE2::PartialMatch(piece, *regex_match_, &match)) { |
| 1737 | return static_cast<OutValue>(match.data() - piece.data()); |
| 1738 | } |
| 1739 | return -1; |
| 1740 | } |
| 1741 | }; |
| 1742 | #endif |
| 1743 |