【发布时间】:2013-04-06 06:23:26
【问题描述】:
我有一个由字符和数字组成的变量$play。例如:
$play = "blah05"
我如何使用preg_match() 只获得 05?
我的$regexp 正确吗?
$regexp = "/^[^0-9]/";
if (preg_match($regexp, $play, $matches)) {
echo "matches[0]";
}
【问题讨论】:
标签: php regex preg-match