PHP Code:
new szError[32];
if((regex = regex_compile("*HID\([a-zA-Z0-9]*)\", iRet, szError, charsmax(szError))) < REGEX_OK){
log_amx("REGEX ERROR: (%i) %s", iRet, szError);
}
Code:
22:15:47 L 03/27/2014 - 22:15:44: [test.amxx] REGEX ERROR: (20) \ at end of pattern
Why a regex could not end with \ ?
Example string:
teeestingggg*HID\helloman123\lalalala
I'm planning to run
PHP Code:
regex_match_c(info, regex, iRet);
regex_substr(regex, 1, hid, charsmax(hid));
So I could get "helloman123".
PS: I tried with "\\" it doesn't match.
PS2: I tried with "(?:*HID\([a-zA-Z0-9]*)\)" which is kind of workaround but I got "(3) nothing to repeat".
Finally I got the regex compiled... I forgot to escape first *
Solution: "\*HID\\([a-zA-Z0-9]*)\\"
__________________