Short link: https://git.io/JsZ62
Serious regexes: https://gist.github.com/jeffangelion/fea9a81af35c690f95201584b5cac075
((Р((\d{0,4}[А-Я]{1,2})|(\d{1,4}[А-Я]{0,2})))|(Р-\d{1,4}-?[А-Я]{1,2}))[\s]+
Match tests:
Value | Should match? |
---|---|
Р-1111-АА |
Yes |
Р-1-А |
Yes |
Р1А |
Yes |
Р-1А |
Yes |
Р1-А |
No |
Р1 |
Yes |
РА |
Yes |
Р |
No |
Р- |
No |
[_\w\d][_\+\-\.\w\d]{0,62}[_\w\d]?@(demo|демо)\.[\w]{2,}
Match tests: later
[A-z]{3}-(1000|[7-9]\d{2}|6([7-9]\d|6([0-5]|[7-9])|[0-5]\d)|[1-5]\d{2}|[2-9]\d|1([0-2]|[4-9])|\d)-[А-ЯЁ]
Match tests: WIP