A regular expression to match non-blank and non-empty strings. Can be used to extract all content without blank lines and empty strings from the document.
/(.|\s)*\S(.|\s)*/
Matches:
- ABC
- A B C
- A+B
Non-matches:
- Any blank lines and empty strings
See Also:
Rate This Regex
User Review
( votes)Expression Flags
Flags | Description |
---|---|
i |
Ignore case sensitive. |
g |
Allows global search. |
m |
Allows multiline search. |