Improved regexp for category switch

This commit is contained in:
thepurpleblob
2006-12-01 16:04:46 +00:00
parent c5c150c146
commit c23b03b50c
+1 -1
View File
@@ -143,7 +143,7 @@ class qformat_gift extends qformat_default {
$text = $this->escapedchar_pre($text);
// Look for category modifier
if (ereg( '^\$CATEGORY:(.+)', $text, $matches)) {
if (ereg( '^\$CATEGORY: *([A-Za-z0-9/]+)[[:space:]]', $text, $matches)) {
$newcategory = $matches[1];
// build fake question to contain category