如何使用x>0和x<20为b% x制作正则表达式, 以便我的程序接受这些:
b%1
b%2
b%3
b%4
...
b%19
function regex(value)
{
$regex = '???';
if (preg_match(regex, value)) {
echo "A match was found.";
} else {
echo "A match was not found.";
}
}
我怎样才能做到?
function regex(value)
{
$regex = '???';
if (preg_match(regex, value)) {
echo "A match was found.";
} else {
echo "A match was not found.";
}
}