Celeb Glow
updates | March 08, 2026

Replace with a newline

Geany, like many text editors, has a replace dialog:

Geany replace

In the Replace with: field, how can I express that I want the pattern to get replaced with a new line character?

2 Answers

How can I express that I want the pattern to get replaced with a new line character?

  • Set "Replace with" to \n
  • Enable "Use regular expressions"
  • Enable "Use multi-line matching"

Regular expression syntax

enter image description here

Source Regular expression syntax

2

The selected answer did not work for me. What did work was checking 'Use escape sequences,' then using the '\n' in the replace field.

This was using Geany 0.21 which did not have "Use multi-line matching."

After updating Geany to 1.30.1 which does have "Use multi-line matching" the selected answer should work.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy