This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Добавить в начале строки Найти ^ Заменить 0; | |
^\W пробел в начале строки | |
\d{8} найти 8 цыфр подряд | |
^\d{4};92 найти В НАЧАЛЕ ЧЕТЫРЕХзначные числа после которы есть ;92 | |
[^=]*$ любые символы, кроме "=" | |
;(.*) все после ; | |
(\b\S+\b)(?=.*\1) повторение на строке | |
\d [0-9] Цифровой символ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function declOfNum(number, titles) { | |
cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
use: | |
declOfNum(count, ['найдена', 'найдено', 'найдены']); |