same_udf_modules.sql 434 B

123456789101112131415
  1. /* postgres can not */
  2. $value = "xaaxaaxaa";
  3. $match = Re2::Match("[ax]+\\d");
  4. $grep = Re2Posix::Grep("a.*");
  5. $capture = Re2::Capture(".*(?P<foo>xa?)(a{2,}).*");
  6. $replace = Re2::Replace("x(a+)x");
  7. $count = Re2::Count("a");
  8. SELECT
  9. $match($value) AS match,
  10. $grep($value) AS grep,
  11. $capture($value) AS capture,
  12. $capture($value)._1 AS capture_member,
  13. $replace($value, "b\\1z") AS replace,
  14. $count($value) AS count;