Fix stock regex_match_simple
Fix regex_match_simple. Where regex_match_ex referred to in this file?
This commit is contained in:
parent
d5086f6a54
commit
21ae30b985
|
@ -305,16 +305,12 @@ native Regex:regex_match_all(const string[], const pattern[], flags = 0, error[]
|
||||||
stock regex_match_simple(const str[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0)
|
stock regex_match_simple(const str[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0)
|
||||||
{
|
{
|
||||||
new Regex:regex = regex_compile_ex(pattern, flags, error, maxLen, errcode);
|
new Regex:regex = regex_compile_ex(pattern, flags, error, maxLen, errcode);
|
||||||
|
if (regex < REGEX_NO_MATCH)
|
||||||
if (regex < 0)
|
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
new substrings = regex_match_c(str, regex);
|
||||||
new substrings = regex_match_c(regex, str);
|
|
||||||
|
|
||||||
regex_free(regex);
|
regex_free(regex);
|
||||||
|
|
||||||
return substrings;
|
return substrings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user