[Phpfreechat-svn] SF.net SVN: phpfreechat: [884] trunk/demo/demo27_dice.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-12-01 09:05:40
|
Revision: 884 http://svn.sourceforge.net/phpfreechat/?rev=884&view=rev Author: kerphi Date: 2006-12-01 01:05:32 -0800 (Fri, 01 Dec 2006) Log Message: ----------- http://www.phpfreechat.net/forum/viewtopic.php?id=895 Modified Paths: -------------- trunk/demo/demo27_dice.class.php Modified: trunk/demo/demo27_dice.class.php =================================================================== --- trunk/demo/demo27_dice.class.php 2006-11-29 17:26:09 UTC (rev 883) +++ trunk/demo/demo27_dice.class.php 2006-12-01 09:05:32 UTC (rev 884) @@ -22,7 +22,7 @@ function check($text){ $this->errors = array(); $this->command= ''; - if(preg_match('/^(\d)d(\d{1,3})([\+-]\d)?$/', $text, $matches)){ + if(preg_match('/^([0-9]+)d([0-9]{1,3})([\+-][0-9]+)?$/', $text, $matches)){ $this->command['launch'] = (int) $matches[1]; $this->command['faces'] = (int) $matches[2]; // Now go for corrections This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |