pcre2pire.h 453 B

12345678910111213141516171819
  1. #pragma once
  2. // Author: smikler@yandex-team.ru
  3. #include <util/generic/string.h>
  4. /* Converts pcre regular expression to pire compatible format:
  5. * - replaces "\\#" with "#"
  6. * - replaces "\\=" with "="
  7. * - replaces "\\:" with ":"
  8. * - removes "?P<...>"
  9. * - removes "?:"
  10. * - removes "()" recursively
  11. * - replaces "??" with "?"
  12. * - replaces "*?" with "*"
  13. * NOTE:
  14. * - Not fully tested!
  15. */
  16. TString Pcre2Pire(const TString& src);