<?php
$regexp = '!^htt(p|ps):\/\/[^\s]{3}\S+|(^$)!';
'http://wt_import(filename)',
'https://1232145',
'http://eom',
'https://content-available-to-author-only.html#465723',
'',
);
'http://example com with many spaces',
' https://2...content-available-to-author-only.....contenttml#465723',
'http, http://, example.com',
'http://ex',
'http://',
'l',
' http:// ',
'https:// ',
'https://DF',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' ',
' sdfsdf ',
'sdfsdf sdfsdf ',
'qeqweqw',
' ',
);
echo "Верные номера.\n\n";
foreach ($correctNumber as $number) {
echo "[+] \"{$number}\"\n";
} else {
echo "[-] \"{$number}\"\n";
}
}
echo "\nНеверные номера.\n\n";
foreach ($wrongNumber as $number) {
echo "[+] \"{$number}\"\n";
} else {
echo "[-] \"{$number}\"\n";
}
}
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgokcmVnZXhwID0gJyFeaHR0KHB8cHMpOlwvXC9bXlxzXXszfVxTK3woXiQpISc7CgokY29ycmVjdE51bWJlciA9IGFycmF5KAogICAgJ2h0dHA6Ly93dF9pbXBvcnQoZmlsZW5hbWUpJywKICAgICdodHRwczovLzEyMzIxNDUnLAogICAgJ2h0dHA6Ly9lb20nLAogICAgJ2h0dHBzOi8vY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuaHRtbCM0NjU3MjMnLAogICAgJycsCik7Cgokd3JvbmdOdW1iZXIgPSBhcnJheSgKICAgICdodHRwOi8vZXhhbXBsZSBjb20gd2l0aCAgICAgbWFueSBzcGFjZXMnLAogICAgJyBodHRwczovLzIuLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLi4uY29udGVudHRtbCM0NjU3MjMnLAogICAgJ2h0dHAsIGh0dHA6Ly8sIGV4YW1wbGUuY29tJywKICAgICdodHRwOi8vZXgnLAogICAgJ2h0dHA6Ly8nLAogICAgJ2wnLAogICAgJyBodHRwOi8vICcsCiAgICAnaHR0cHM6Ly8gJywKICAgICdodHRwczovL0RGJywKICAgICcgJywKICAgICcgICcsCiAgICAnICAnLAogICAgJyAgICcsCiAgICAnICAgICcsCiAgICAnICAgICAnLAogICAgJyAgICAgICcsCiAgICAnICAgICAgICcsCiAgICAnICAgICAgICAgICcsCiAgICAnICAgICAgICAgICAgJywKICAgICcgICAgICBzZGZzZGYgICAgICAnLAogICAgJ3NkZnNkZiAgICAgIHNkZnNkZiAgICAgICcsCiAgICAncWVxd2VxdycsCiAgICAnICAgICAgICAgICAgJywKKTsKCmVjaG8gItCS0LXRgNC90YvQtSDQvdC+0LzQtdGA0LAuXG5cbiI7Cgpmb3JlYWNoICgkY29ycmVjdE51bWJlciBhcyAkbnVtYmVyKSB7CiAgICBpZiAocHJlZ19tYXRjaCgkcmVnZXhwLCAkbnVtYmVyKSkgewogICAgICAgIGVjaG8gIlsrXSBcInskbnVtYmVyfVwiXG4iOwogICAgfSBlbHNlIHsKICAgICAgICBlY2hvICJbLV0gXCJ7JG51bWJlcn1cIlxuIjsKICAgIH0KfQoKZWNobyAiXG7QndC10LLQtdGA0L3Ri9C1INC90L7QvNC10YDQsC5cblxuIjsKCmZvcmVhY2ggKCR3cm9uZ051bWJlciBhcyAkbnVtYmVyKSB7CiAgICBpZiAocHJlZ19tYXRjaCgkcmVnZXhwLCAkbnVtYmVyKSkgewogICAgICAgIGVjaG8gIlsrXSBcInskbnVtYmVyfVwiXG4iOwogICAgfSBlbHNlIHsKICAgICAgICBlY2hvICJbLV0gXCJ7JG51bWJlcn1cIlxuIjsKICAgIH0KfQo=