Password Without Spaces
beginnerValidates passwords that contain no whitespace characters.
passwordvalidationwhitespace
Pattern
/^\S{8,}$/Try It
0 of 7 strings matched
Explanation
Matches 8 or more non-whitespace characters from start to end. Rejects any password containing spaces, tabs, or other whitespace.
Test Strings
Matching
- NoSpaces1!
- tight_password
- P@$$w0rd
Non-matching
- has space
- tab here
- short
Language Compatibility
| Language | Support |
|---|---|
| JS | Full support |
| PYTHON | Full support |
| JAVA | Full support |
| PHP | Full support |
| GO | Full support |
Code Snippets
const regex = /^\S{8,}$/;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);