How to search and replace with nano text editor

Nano is a very compact and feature packed text editor commonly found on Linux and Unix based OS. One of the lesser used feature that is very useful is search & replace.

To Search and Replace text in the currently open file:

The search string can also be a regular expression.

5 thoughts on “How to search and replace with nano text editor”

  1. Not sure if I am the only one but i found that the only way I could toggle the regex search was to M-R while in the Search function (i.e. ^W)

Leave a Reply

Your email address will not be published. Required fields are marked *