> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Advanced search and replace in Notepad++
- URL: https://kudithipudi.org/how-to-advanced-search-and-replace-in-notepad/
- Published: 2009-12-13T07:08:05.000Z
- Updated: 2009-12-13T07:08:05.000Z
- Description: Jhanvi asked me to help with editing a text file recently. She had a file in the format ‘512’ ‘345’ ‘876’ and needed to convert it...
- Author: admin
- Tags: HOWTO, Technology, Uncategorized, Windows, #wp, #wp-post, #Import 2026-08-23 02:32

Jhanvi asked me to help with editing a text file recently. She had a file in the format

  
`'512'  
'345'  
'876'`  
  
and needed to convert it into the format below

  
`INSERT INTO BLAH VALUE ('512');  
INSERT INTO BLAH VALUE ('345');  
INSERT INTO BLAH VALUE ('876');`

There are multiple ways, one can do this. Here is how I did this using [Notepad++](http://notepad-plus.sourceforge.net/uk/site.htm?ref=kudithipudi.org), an open source text editor. I used the regular expression capability of Notepad++ it’s search and replace function.

- Press “Ctrl + h” to bring up the search and replace window.
- Replace the single quote at the beginning of the line by using ” ^’ “
- Replace the single quote at the end of the line by using ” ‘$ “

### Screenshots from the operation

The data in it’s original format

![](http://farm3.static.flickr.com/2759/4180092991_63bb8ba6e5.jpg "Notepad++ : Screenshot 0")

Replacing the first quote mark

![](http://farm5.static.flickr.com/4048/4180855864_e754f8a122_o.png "Notepad++ : Screenshot 1")

Data after the first search and replace operation

![](http://farm3.static.flickr.com/2723/4180855890_fa2471b362_o.png "Notepad++ : Screenshot 3")

Replacing the second quote mark

![](http://farm3.static.flickr.com/2740/4180855908_394c5dd782_o.png "Notepad++ : Screenshot 4")

Data in the final format

![](http://farm5.static.flickr.com/4037/4180855924_b1c28711a7_o.png "Notepad++ : Screenshot 4")