How do I use preg_match
to detect a string where it has to start with "/ command"?
This function, for me, is very complicated to understand ...
I wanted to detect a / command at the beginning of a sentence and get the rest of the string to continue the command
For example:
/ talk test1 test2 test3
Detect the "/ talk" command and say "test1 test2 test3"