- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
With JavaScript Regular Expression find a non-whitespace character.nn
To find a non-whitespace character, use the following −
\S
Example
You can try to run the following code to find non-whitespace character −
<html> <head> <title>JavaScript Regular Expression</title> </head> <body> <script> var myStr = "100% Responsive!"; var reg = /\S/g; var match = myStr.match(reg); document.write(match); </script> </body> </html>
- Related Articles
- With JavaScript Regular Expression find a non-whitespace character.\n\n
- Find the non-digit character with JavaScript Regular Expression
- How to match any non-digit character in Python using Regular Expression?\n\n
- How to match any one uppercase character in python using Regular Expression?\n\n
- How regular expression anchors work in Python?\n\n
- How to match nonword characters in Python using Regular Expression?\n\n\n\n
- Regular Expression re{ n} Metacharacter in Java
- How to match a whitespace in python using Regular Expression?
- Regular Expression re{ n, m} Metacharacter in Java
- Find non-word character in a string with JavaScript RegExp
- Explain JavaScript Regular Expression modifiers with examples
- How to match at the end of string in python using Regular Expression?\n\n
- How to write Python regular expression to get zero or more occurrences within the pattern?\n\n
- What are character classes or character sets used in Python regular expression?
- Regular Expression Matching in JavaScript
- How to match a nonwhitespace character in python using Regular Expression?

Advertisements