^a-zA-Z0-9 excluding spaces?
You could also try with:
/[^a-zA-Z0-9\s]/gi
try ^[\d\w]*$
or ^[\w]*$
as reg' Expression means from ^(start)
to $(end)
match 0-9a-zA-Z
only
for c++ ansistring="^[\\d\\w]*$";
If you only want to exclude spaces use:
[^ ]*
Test the regex here if you want.