<?php
$valid = [
'%u003c%u0073%u0063%u0072%u0069%u0070%u0074%u003e',
'%u003c',
'%u0046%u005c',
];
$invalid = [
'asd',
'%a003da',
'%k41ad',
'Бла бла бла',
'%u003c%u0073%u0063%',
'%u003c%u0073ASFQ%u0063',
];
print("--- valid\n");
foreach ($valid as $value) {
print("`$value` ".((preg_match ('/^(?:%u00[\da-z]{2})+$/' , $value, $matches)) ?
'valid' : 'invalid')."\n"); }
print("--- invalid\n");
foreach ($invalid as $value) {
print("`$value` ".((preg_match ('/^(?:%u00[\da-z]{2})+$/' , $value, $matches)) ?
'valid' : 'invalid')."\n"); }
PD9waHAKCiR2YWxpZCA9IFsKCScldTAwM2MldTAwNzMldTAwNjMldTAwNzIldTAwNjkldTAwNzAldTAwNzQldTAwM2UnLAoJJyV1MDAzYycsCgknJXUwMDQ2JXUwMDVjJywKXTsKCiRpbnZhbGlkID0gWwoJJ2FzZCcsCgknJWEwMDNkYScsCgknJWs0MWFkJywKCSfQkdC70LAg0LHQu9CwINCx0LvQsCcsCgknJXUwMDNjJXUwMDczJXUwMDYzJScsCgknJXUwMDNjJXUwMDczQVNGUSV1MDA2MycsCl07CgoKcHJpbnQoIi0tLSB2YWxpZFxuIik7CmZvcmVhY2ggKCR2YWxpZCBhcyAkdmFsdWUpIHsKCXByaW50KCJgJHZhbHVlYCAiLigocHJlZ19tYXRjaCAoJy9eKD86JXUwMFtcZGEtel17Mn0pKyQvJyAsICR2YWx1ZSwgJG1hdGNoZXMpKSA/ICd2YWxpZCcgOiAnaW52YWxpZCcpLiJcbiIpOwp9CnByaW50KCItLS0gaW52YWxpZFxuIik7CmZvcmVhY2ggKCRpbnZhbGlkIGFzICR2YWx1ZSkgewoJcHJpbnQoImAkdmFsdWVgICIuKChwcmVnX21hdGNoICgnL14oPzoldTAwW1xkYS16XXsyfSkrJC8nICwgJHZhbHVlLCAkbWF0Y2hlcykpID8gJ3ZhbGlkJyA6ICdpbnZhbGlkJykuIlxuIik7Cn0KCg==