0

or example

if(playerName.Contains("<") || playerName.Contains("-")){

}

or how i can check string with regex pattern(^[-0-9A-Za-z_]{5,15}$)

Thanks

Irakli Lekishvili
  • 33,492
  • 33
  • 111
  • 169

1 Answers1

1

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

buckley
  • 13,690
  • 3
  • 53
  • 61