Replace string with proper tab character in Notepad++
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!
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"
- In newer version of Notepad++ this setting is now in "Settings" > "Preferences" > "Language" > "Tab Settings"
-
Second, you may also want to enable "Show White Space and TAB".
"View" > "Show Symbol" > "Show White Space and TAB"
Menu "Search" > "Replace" (or Ctrl + H)
Set "Find what" to
""\\t""
Set "Replace with" to
\t
Enable "Regular expression"
-
Click "Replace All"
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
→
Further reading
- How to use regular expressions in Notepad++ (tutorial)
- Notepad++: A guide to using regular expressions and extended search mode
- Regular Expressions Tutorial
- RegExr: Learn, Build, & Test RegEx
- regex101: Online regex tester and debugger