Update Parser.java

Used regex to increase flexibility of command input