regex = re.compile(r'.*(.)(\1)(\1)(\1).*$', re.I)
import re
def has_consecutive_characters(s, count):
return bool(re.search(rf'([\dA-Z])\1{{{count - 1}}}', s, re.IGNORECASE))
arr = [
'PAaAssword',
'Paaaassword',
'P111ssword',
'Password',
]
print([ has_consecutive_characters(n, 3) for n in arr ])
Set ApplicationPath="D:\program.exe"
cmd /min /C "set __COMPAT_LAYER=RunAsHighest && start "" %ApplicationPath%"
const resultContainer = document.querySelector('.result');
if (resultContainer.classList.contains('win')) {
// ...
} else if (resultContainer.classList.contains('lose')) {
// ...
}
console.log( Math.floor( Math.random() * Number.MAX_SAFE_INTEGER + 1 ) );
console.log( Math.random().toString().slice(2) )
names = appData.filter(function (x) { return skipped.indexOf(x) < 0; })
get("https://serv.io/set?" + names.join("|")).then(function (data) {
result = JSON.parse(data);
Object.entries(result).forEach(([name,{act, total}])=>{
console.log(name,act,total) // переменные name,act,total тут локальны, но сами уже разберетесь
});
RewriteRule ^[0-9]{1,}$ https://site.ru/? [L,R=301]