AMX Mod X API Documentation

Signature
native Regex:regex_compile_ex(const pattern[], flags = 0, error[] = "", maxLen = 0, &errcode = 0);
Description

Precompile a regular expression.

Notes
  • Use this if you intend on using the same expression multiple times.

    Pass the regex handle returned here to regex_match_c() to check for matches.

  • Unlike regex_compile(), this allows you to use PCRE flags directly.
Parameters
  • pattern The regular expression pattern.
  • flags General flags for the regular expression, see PCRE_* defines.
  • error Error message encountered, if applicable.
  • maxLen Maximum string length of the error buffer.
  • errcode Regex type error code encountered, if applicable. See REGEX_ERROR_* defines.
Returns

Valid regex handle (> 0) on success, or -1 on failure.

Назад
Верх