^a-zA-Z0-9 Excluding Spaces?


Answer :

You could also try with:

/[^a-zA-Z0-9\s]/gi 

If you only want to exclude spaces use:

[^ ]* 

Test the regex here if you want.


Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android SDK Location Should Not Contain Whitespace, As This Cause Problems With NDK Tools