I need to make a regex pattern to check if whole input string is made out of characters a-z, A-Z, 0-9 without spaces in the middle. I tried using ^[ ]*[a-zA-Z0-9][ ]*$ to find but it doesn't work for some reason.
For example, " dnsjkfs32NJ" is a valid string but "fds fsdfs" is not.
Thanks. :)