I might be blanking out here but I think this is the only way:
Code:
#include <amxmodx>
#include <regex>
public plugin_init() {
register_plugin("Test Plugin 9", "", "[ --{-@ ]");
new ret;
new Regex:hRegex = regex_compile("\w+", ret, "", 0);
new str[] = "str1-str2-str3-str4";
new match[10];
new pos;
while ( regex_match_c(str[pos], hRegex, ret) != 0 ) {
regex_substr(hRegex, 0, match, charsmax(match));
server_print("String: %s", match);
pos = strfind(str, match) + strlen(match);
}
}
__________________