I have an actual issue this time. My parser uses a simple preg_match method, but it's matching more than one command. 'unseath from left' is matched with 'remove left.' I know this is got to be common, but I'm not sure of the fix.
class CommandParser
{
private $command;
public function parseCommand($prompt)
{
$commands = array(
array("command" => "item info", "regex" => "/system item info token (?<token>\w+) table...
Code (markup):
from PHP http://bit.ly/2IsAQIc
via IFTTT
0 Comments