Build a console similar to minecraft

So this will come off as a little weird, but bare with me. There are probably many other games like this but Minecraft is the one that pops into my head.

So in minecraft, when you press “/”, a command line comes up. You can then type in commands.

But if you do “/kill Username”, it will make no difference from “/kill Username”

I basically want to write a console with commands and it won’t matter how many spaces someone puts or anything like that.

Maybe you can search about Regular Expression. It can help you to recognizes the command that user inputed, and seperated the input values