Showing posts with label regular expression. Show all posts
Showing posts with label regular expression. Show all posts

Monday, May 31, 2021

Matching an empty line with regular expression string match

 
 
works in regular expression search mode in notepad++
 
^\s*$

Explanation:

  • ^ is the beginning of string anchor.
  • $ is the end of string anchor.
  • \s is the whitespace character class.
  • * is zero-or-more repetition of.

In multiline mode, ^ and $ also match the beginning and end of the line.

 
 
--30--