Sublime Forum

RegEx: How to Search and Replace a blank line with (anything)

#1

hello, can anyone tell me how to Search and Replace a Blank line with a symbol, a word or anything with RegEx?

0 Likes

#2

Find menu -> Replace..., tick RegEx mode, use pattern ^$ in the Find What box and your desired replacement symbol, word or anything in the Replace With box.

1 Like

#3

this will work

^\s\n*

and replace with what you want

1 Like

#4

depending how you define a blank line, @me_suzy’s suggestion may be more useful than mine :slight_smile:

0 Likes