diff --git a/library/think/Template.php b/library/think/Template.php index 015a5664..8e1c0e3e 100644 --- a/library/think/Template.php +++ b/library/think/Template.php @@ -793,7 +793,7 @@ class Template public function parseVar(&$varStr) { $varStr = trim($varStr); - if (preg_match_all('/\$[a-zA-Z_](?>\w*)(?:[:\.][a-zA-Z_](?>\w*))+/', $varStr, $matches, PREG_OFFSET_CAPTURE)) { + if (preg_match_all('/\$[a-zA-Z_](?>\w*)(?:[:\.][0-9a-zA-Z_](?>\w*))+/', $varStr, $matches, PREG_OFFSET_CAPTURE)) { static $_varParseList = []; while ($matches[0]) { $match = array_pop($matches[0]);