Quote:
Originally Posted by Dr!fter
How about you, idk, use the error params...
PHP Code:
Regex CompileRegex(const char[] pattern, int flags, char[] error, int maxLen, RegexError& errcode)
Ill just add, that you should use SM 1.9 for those (since they were broken previously)
|
Thanks...
PHP Code:
#include <regex>
public void OnPluginStart() {
char sError[128];
RegexError rError;
Handle hExpression = CompileRegex("[\\x{D800}-\\x{DBFF}]", PCRE_UCP, sError, sizeof(sError), rError);
PrintToServer("Regex: %i | Error: %s | RegexError: %i", hExpression, sError, rError);
}
Regex: 0 | Error: this version of PCRE is not compiled with Unicode property support | RegexError: 16
sm exts list
Regex (1.9.0.6241): Provides regex natives for plugins
With PCRE_CASELESS flag:
Regex: 0 | Error: character value in \x{...} sequence is too large | RegexError: 3