Find and replace in geany
The other day I wanted to do a find-and-replace in geany using a regex in the find. I wanted to turn something like this
Field name: value
into
Field name: value plus some more
Since geany supports regex searching, I decided it was time to find out how to do regex replacements too. The way it works, is that you put parentheses around each match that you want to be able to use in the replacement string, and then reference these replacements using backslash-number. So the find string becomes
^Field name: (.*)
and the replacement string becomes
Field name: \1 plus some more
That was too easy.
Posted Monday, February 18, 2019