This question has already been answered:

For example, for the numerical value of the type of card number I use:

/[^0-9]/ 

It removes from the received string all characters except digits. \

Please tell me the pattern for the Skype username, to be honest, I don’t know what characters are allowed there, maybe underscores, maybe points, maybe not.

Reported as a duplicate by participants of ReinRaus , aleksandr barakin , VenZell , Pavel Mayorov , D-side 27 Apr '16 at 8:09 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • @ReinRaus, but in skype, you can use Microsoft account as well - is this also taken into account? - Grundy
  • @Grundy You mean how can you log in to the system? There is still a phone number, and Facebook can go, but I think that to call someone enough to know his login. - ReinRaus
  • @ReinRaus, and there unless login authorization is not the same as in facebook or what entered? - Grundy
  • At the moment in the question is completely correct Skype username. I was wrong - ReinRaus
  • @Grundy as I understood when authorizing via Facebook, there is no Skype username as such. Now I will try to look for Microsoft - ReinRaus

1 answer 1

This is how it seems:

 /[^a-z0-9\._\-]/ 

Deletes everything except for points, underscores, hyphens, Latin, numbers.

  • commas are still possible and length 6-32 - ReinRaus
  • why do I need length? non-mandatory attribute - PHPcoder
  • yes and in preg_replace (); if you set the length, the function does not work - PHPcoder