Replace string with proper tab character in Notepad++

6

2

I have a string like this:

"001234","123","","Automated Letters""\t""Arrears Advice","\\PATH\FILE.doc"

Instead of Automated Letters""\t""Arrears Advice I need Automated Letters Arrears Advice

How can I make such a find/replace in Notepad++?

I would do this manually, but I have 750 records!

Our Man in Bananas

Posted 2016-03-07T15:20:26.227

Reputation: 226

Answers

7

How do I replace a string with proper tab character?

  • First make sure you have "Replace by space" unchecked in "Tab Settings".

    "Settings" > "Preferences" > "Tab Settings" > uncheck "Replace by space"

    • In newer version of Notepad++ this setting is now in "Settings" > "Preferences" > "Language" > "Tab Settings"

    enter image description here

  • Second, you may also want to enable "Show White Space and TAB".

    "View" > "Show Symbol" > "Show White Space and TAB"

    enter image description here

  • Menu "Search" > "Replace" (or Ctrl + H)

  • Set "Find what" to ""\\t""

  • Set "Replace with" to \t

  • Enable "Regular expression"

  • Click "Replace All"

    enter image description here

Before:

""001234","123","","Automated Letters""\t""Arrears Advice","\\PATH\FILE.doc""

After:

"001234","123","","Automated Letters    Arrears Advice","\\PATH\FILE.doc"

Note:

  • If you have "Show White Space and TAB" the tab characters will display as

    enter image description here


Further reading

DavidPostill

Posted 2016-03-07T15:20:26.227

Reputation: 118 938

@OurManInBananas Apologies for rejecting your edit. I didn't realise you were the OP and had edited your question. I will make the edit myself. – DavidPostill – 2016-03-07T16:19:30.350

LOL - there goes my first accepted edit badge, thanks David! – Our Man in Bananas – 2016-03-07T17:54:04.950

I don't see this item in the version 7.5.5 – Ihor B. – 2018-05-29T08:27:15.527

1@IhorB. "Settings > Preferences > Language > Tab Settings." in newer versions – DavidPostill – 2018-05-29T19:38:03.093

Perhaps put the information about newer versions of Notepad++ first? – Peter Mortensen – 2018-07-03T08:51:48.297

It changed to "Language" in version 7.1 (2016-10-16) (and was "Language Menu/Tab Settings" for some time, changed from "Tab Settings")). – Peter Mortensen – 2018-07-03T08:53:48.013