I need a regex expression that will validate that a string is not all whitespace and that it does not include the comma (,) character.
I've been able to find examples that do one or the other, but not both:
^(?![\s,]*$).+
to insure not all white space and^(.(?!,))*$
to exclude commas.
I don't have the option of using code, this is a constraint on a field in a form.
This should suit your needs:
^[^,]*[^ ,][^,]*$
"At least one char that is not a space nor a comma, surrounded by any char but a comma"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With