String contains or regex in pawn scripting language
Question
or example
if(playerName.Contains("<") || playerName.Contains("-")){
}
or how i can check string with regex pattern(^[-0-9A-Za-z_]{5,15}$)
Thanks
Solution
I think you are saying that the string should contain at least a - or a < right? Than it's
(^(?=.*[-<])[-0-9A-Za-z_<]{5,15}$)
The technique of lookaround is used to make this possible
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow