0
How do I use the preg_match
to detect a string where you have 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 take the rest of the string to continue the command
For example:
/speak test 1 test 2 test 3
Detect the "/speak" command and say "teste1 teste2 teste3"
I would still recommend treating the return of the function on if, something thus, to ensure that the format was suitable, but still better than
explode
. +1– Woss
Very good. Obg!
– Sam