problem of the analyzer

I have a real problem this time. My parser uses a simple preg_match method, but it matches several commands. "unseath from left" is associated with "remove left". I know it has to be common, but I'm not sure of the solution.
SEMrush

CommandParser class
{

private $ command;

public service parseCommand ($ prompt)
{

$ orders = array (
array ("command" => "element information", "regex" => "/ system element information token (? w +) table (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put the (?. +) in the (?. +) / "),
array ("command" => "extract from container", "regex" => "/ take (?. +) of (?. +) / "),
array ("command" => "extract from container", "regex" => "/ get (?. +) of (?. +) / "),
array ("command" => "extract from container", "regex" => "/ take (?. +) of (?. +) / "),
array ("command" => "extract from container", "regex" => "/ get (?. +) of (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put the (?. +) in the (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put the (?. +) in the (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put the (?. +) in (?. +) / "),
array ("command" => "extract from container", "regex" => "/ take (?. +) of (?. +) / "),
array ("command" => "extract from container", "regex" => "/ get (?. +) of (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put (?. +) in the (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put (?. +) in the (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put (?. +) in the (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put the (?. +) in (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put (?. +) in (?. +) / "),
array ("command" => "put in the container", "regex" => "/ put (?. +) in (?. +) / "),
array ("command" => "look in the container", "regex" => "/ look in the (?. +) / "),
array ("command" => "look in the container", "regex" => "/ look in (?. +) / "),
array ("command" => "unsheath from", "regex" => "/ unsheath from (?. +) / "),
array ("command" => "remove item", "regex" => "/ remove the (?. +) / "),
array ("command" => "wear item", "regex" => "/ wear the (?. +) / "),
array ("command" => "travel to room", "regex" => "/ travel room (? w +) / "),
array ("command" => "unsheathed weapon", "regex" => "/ unsheath (?. +) / "),
array ("command" => "get item", "regex" => "/ get (?. +) / "),
array ("command" => "wear item", "regex" => "/ wear (?. +) / "),
array ("command" => "remove item", "regex" => "/ remove (?. +) / "),
array ("command" => "look", "regex" => "/ look /"),
array ("command" => "map", "regex" => "/ map /"),
array ("command" => "character", "regex" => "/ character /"),
array ("command" => "equipped", "regex" => "/ equipped /")
)
$ command = array ();

$ matchFound = false;

foreach ($ commands as $ key => $ val)
{

if (! $ matchFound)
{

preg_match ($ commands[$key]['regex'], $ prompt, $ matches);
{

if (! empty ($ matches))
{

$ order["command"] = $ orders[$key]['command'];
$ order["matches"] = $ corresponds;
$ matchFound = true;


}

}

}


}

if (empty ($ order))
{

$ order["command"] = & # 39; unrecognized command & # 39 ;;
$ order["matches"] = & # 39 ;;

}

// var_dump ($ command);
return $ command;

}

}

Code (markup):

Proxy Sites Proxy Tunnels Proxy List Working Proxy Sites Hotproxysite Proxy Sites Proxy Sites Anonymous Proxy Anonymous Proxies Top-Proxies.co.uk http://www.proxysitesnow.com Proxy Servers Free Proxies Free Proxy List Proxy List Zoxy Proxy List PR liste all proxy sites More Proxies netgofree netgofree Hide-MyIp - The Best Proxy List American Proxy List www.proxylisty.com/proxylist Web Proxy Submit Proxies Updated Proxy List Updated Proxy List aproxy.org Bypass Proxy Sites Free Proxies List Evolving Critic Business Web Directory Free Proxy List iShortIt MyProxyList Online Proxies Go Proxies Need Proxies PrivateProxies Proxies4MySchool Proxies4Work Free Proxy List Free Proxy Sites ProxyInside Wiksa Proxy ProxyLister.org Free Proxy List ProxyNoid Proxy List Free Proxy List Proxy Sites Proxy TopList ProxyVille UK Proxy WebProxy List RatedProxy.com - Listing the best Web Proxies Free Proxy List SchoolProxiesList Stay Anonymous Proxy List The Power Of Ninja Proxy List UNubstruct Free proxy sites Free proxy sites