Help with a simple think

I’m trying to create a local chat system for my RP server, its working but there’s only one problem, when i press /g that means geral the message appear normaly, but when someone type /d or /s or /sdsds any word with a / before, the same message appear to everyone, there’s a way to limit the / to work only with /g ?

Sorry for english, isnt native language.