Hey guys, I didn't see a regex board, so if this is the wrong section, you can move it.
I'm working on a script where you enter a command then a username then a 3rd arguement (in this case a hex code).
$message = "/color Corey 000";
if (ereg ("^/(ban|color|invisible) (.*) (.*)", $message, $cmd))
But I want the username and the 3rd argument to have quotes around them (single or double I really don't care at this point). Such as
$message = "/color 'Corey' '000'";
I assumed this regex would work but it doesn't.
if (ereg ("^/(ban|color|invisible) '(.*)' '(.*)'", $message, $cmd))
I've tried several other variations such as ['(.*)'] and other stuff too but I just can't get it to work.