$invalid = array
(
"/(?<=[^р-я])я[.^р-я]*/",
"/(?<=[^р-я])ф[.^р-я]*/",
"/(?<=[^р-я])мар[.^р-я]*/",
"/(?<=[^р-я])ап[.^р-я]*/",
"/(?<=[^р-я])май[.^р-я]*/",
"/(?<=[^р-я])юн[.^р-я]*/",
"/(?<=[^р-я])юл[.^р-я]*/",
"/(?<=[^р-я])ав[.^р-я]*/",
"/(?<=[^р-я])сеп[.^р-я]*/",
"/(?<=[^р-я])о[.^р-я]*/",
"/(?<=[^р-я])н[.^р-я]*/",
"/(?<=[^р-я])дек[.^р-я]*/",
"/(?<=[^р-я])сек[.^р-я]*/",
"/(?<=[^р-я])ми[.^р-я]*/",
"/(?<=[^р-я])ч[.^р-я]*/",
"/(?<=[^р-я])ден[.^р-я]*/",
"/(?<=[^р-я])дни[.^р-я]*/",
"/(?<=[^р-я])ме[.^р-я]*/",
"/(?<=[^р-я])г[.^р-я]*/"
);
$valid = array
(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
"seconds",
"minutes",
"hours",
"day",
"days",
"months",
"years"
);
$invalid = array
(
"/(?<=[^a-z])ja[.^a-z]*/",
"/(?<=[^a-z])f[.^a-z]*/",
"/(?<=[^a-z])mar[.^a-z]*/",
"/(?<=[^a-z])ap[.^a-z]*/",
"/(?<=[^a-z])may[.^a-z]*/",
"/(?<=[^a-z])jun[.^a-z]*/",
"/(?<=[^a-z])jul[.^a-z]*/",
"/(?<=[^a-z])au[.^a-z]*/",
"/(?<=[^a-z])s[.^a-z]*/",
"/(?<=[^a-z])o[.^a-z]*/",
"/(?<=[^a-z])n[.^a-z]*/",
"/(?<=[^a-z])d[.^a-z]*/"
);
$valid = array
(
"Ян",
"Фев",
"Мар",
"Апр",
"Май",
"Юни",
"Юли",
"Авг",
"Септ",
"Окт",
"Ное",
"Дек"
);
$invalid = array
(
"/[^а-я]я[.^а-я]*/",
"/[^а-я]ф[.^а-я]*/",
"/[^а-я]мар[.^а-я]*/",
"/[^а-я]ап[.^а-я]*/",
"/[^а-я]май[.^а-я]*/",
"/[^а-я]юн[.^а-я]*/",
"/[^а-я]юл[.^а-я]*/",
"/[^а-я]ав[.^а-я]*/",
"/[^а-я]сеп[.^а-я]*/",
"/[^а-я]о[.^а-я]*/",
"/[^а-я]н[.^а-я]*/",
"/[^а-я]дек[.^а-я]*/",
"/[^а-я]сек[.^а-я]*/",
"/[^а-я]ми[.^а-я]*/",
"/[^а-я]ч[.^а-я]*/",
"/[^а-я]ден[.^а-я]*/",
"/[^а-я]дни[.^а-я]*/",
"/[^а-я]ме[.^а-я]*/",
"/[^а-я]г[.^а-я]*/"
);
$invalid = array
(
"/[^a-z]ja[.^a-z]*/",
"/[^a-z]f[.^a-z]*/",
"/[^a-z]mar[.^a-z]*/",
"/[^a-z]ap[.^a-z]*/",
"/[^a-z]may[.^a-z]*/",
"/[^a-z]jun[.^a-z]*/",
"/[^a-z]jul[.^a-z]*/",
"/[^a-z]au[.^a-z]*/",
"/[^a-z]s[.^a-z]*/",
"/[^a-z]o[.^a-z]*/",
"/[^a-z]n[.^a-z]*/",
"/[^a-z]d[.^a-z]*/"
);
<?php
function validate_months($string)
{
$invalid = array
(
"/я[нуари]/",
"/ф[евруари]/",
"/мар[т]/",
"/ап[рил]/",
"/май/",
"/юн[и]/",
"/юл[и]/",
"/ав[густ]/",
"/с[ептември]/",
"/о[ктомври]/",
"/н[оември]/",
"/д[екември]/"
);
$valid = array
(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
);
$string = preg_replace($invalid, $valid, mb_strtolower($string));
// And to strip other weird stuff, I've created another function
$string = strip_weirdness($string);
return $string;
}
?>
$pattern = array('/я[а-я]+[^а-я]/', '/ф[\p{L}]+[^\p{L}]/', '/м[\p{Cyrillic}][^\p{Cyrillic}]/')
$replacement = array('january', 'february', 'march')
$subject = януари февруари some english март
Best: Use a strong password generator (very safe, but not really easy to remember)
Middle: Use this generator (not very safe, but fairly easy to remember)
Worst: Chose a password, which is either very easy to guess, or just the same as your username (no comment)
(SELECT `column` FROM `table` LIMIT x,1)
UNION ALL
(SELECT `column` FROM `table` LIMIT y,1)
UNION ALL
(SELECT `column` FROM `table` LIMIT z,1)