I`m building messaging app and I need regex or some other way to validate message that user is about to send. Message must contain at least one character, expect for space.
const valid = *regex*
const message_a = "Hello, Jim!";
const message_b = " ";
const message_c = " ";
valid.test(message_a) === **true**
valid.test(message_b) === **false**
valid.test(message_c) === **false**
I don't know how to make regex, so I just searched for such regex and found none. So I'm really looking forward for your answers, thanks!