20.04.2011, 11:50
(
Last edited by HP; 20/04/2011 at 12:55 PM.
)
Isn't this more accurate and faster:
Some Roleplay names may be eg. Roberto_DeLuca.
// Fixed a little bug in the code, Thanks to Y_Less.
pawn Code:
stock IsValidRpNameEx(const string[])
{
static
RegEx:rRpName
;
if ( !rRpName )
{
rRpName = regex_build("[A-Z][a-z]+_[A-Z][a-z]{1,3}[A-Z]?[a-z]*");
}
return regex_match_exid(string, rRpName);
}
// Fixed a little bug in the code, Thanks to Y_Less.