Tuesday, July 15, 2008

Notepad++ - replace a pattern with line break then sort line in the order

There are something new in the Notepad++ 5.0.

I can replace a pattern with line break.
Let's say I have
"AAA" "BBB" "CCC" "ABC"
I enter CTL+F to open Find, then switch to Replace.
In Find What, I enter " " and Replace With \n, then I need to check Search Mode > Extended (\n, \r ...). Then hit "Replace All" button.
I got
"AAA
BBB
CCC
ABC"
I just delete two quotes simply.
Then in the menu > TextFX > Text FX Tools > Sort Line ...

That's all.
Notepad++ is getting better and better,

4 comments:

Anonymous said...

I use for editing Notepad++ because is a very complex program and support languages like C; C++; Java; C#; XML; HTML; PHP; CSS; makefile ASCII art (.nfo); doxygen ini file and other. Olso you can edit several documents at the same time. I got it from here: Notepad++

Chris Seidl said...

I had no idea Notepad++ had regex support. Editing code just got a lot easier.

Anonymous said...

I also use it because it's excellent in some areas, but Regex support in Notepad++ has much room for improvement (I would like to see it matching the Regex capabilities of the Find dialog in Visual Studio...).

Anonymous said...

Perfect my friend. I am glad you are sharing this to us notepad++ users.