Consider the following: this.state.message.match(/^\/m\s+(\w+):\s*(.*)/)
This looks for a message that contains: /m name: message
where its failing if your name has a space in it: /m name something: message
. What would be the proper way to update this such that the name can have spaces or other characters other then just name
for example: \m Character name: message
fails, but \m Sample: message
does not.
thoughts?