Regex To Match Non-blank And Non-Empty String

Category: Strings

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.



  • ABC
  • A B C
  • A+B


  • Any blank lines and empty strings

See Also:

Rate This Regex
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.