How to make a regular expression?

You have to filter the login. Available characters: kirilica, Latin, digits and no more than two spaces (but not at the edges), all other characters should be ignored. Help to make the regular season, an urgent need..
March 19th 20 at 08:22
2 answers
March 19th 20 at 08:24
Solution
(?=^\S+(\s\S+(\s\S+)?)?$)^[a-ha-Aeea-zA-Z0-9\s]+$

https://regex101.com/r/8E8w2k/1
March 19th 20 at 08:26

Find more questions by tags Regular expressions