This regex lets me have a string with alphanumeric, dash, underscore, and space chars in my string:
^[a-zA-Z0-9-_ ]+$
However, I need it to prevent string starting and ending by space. How can I do it?
This regex lets me have a string with alphanumeric, dash, underscore, and space chars in my string:
^[a-zA-Z0-9-_ ]+$
However, I need it to prevent string starting and ending by space. How can I do it?