Text editor to search/replace newlines and tabs
7
votes
2
answers
19227
views
A time-saving feature I often used while editing large text files (the kind used for batch processes of data exchanges, aka, "flat files" for feeds between multiple systems) was Notepad++'s extended Find/Change function where you can specify certain characters (such as tab, space, line feed, carriage return) in both the Find function and the Change function.
This is the detail on how it works:
> Open the find/replace dialog. At the bottom will be some Search mode
> options. Select "Extended (\n \r \t \0 \x...)" In either the Find
> what or the Replace with field entries, you can use the following
> escapes:
>
> - \n new line (LF)
> - \r carriage return (CR)
> - \s space character
> - \t tab character
This would make it very easy to edit lists of information, changing files from comma to tab delimited, or files with spaces between into comma delimited, as well being easy to go from spaces to tabs (or visa versa).
Anyone happen to know which text editors running on Mac OS have this feature (or have plugins to add this functionality)?
---- edit/update, 2024:
I don't know if it's inattention on my part, or a new feature (doubt the latter, tbh); I've just found the find/replace in Visual Studio Code allows for RegEx. To activate it, use the ".*" button in the document level search bar. For more on RegEx, I find this q+a to be useful: https://superuser.com/questions/962323/replace-with-a-newline
Asked by krysradz
(73 rep)
Aug 10, 2018, 11:52 PM
Last activity: Jul 11, 2024, 01:09 AM
Last activity: Jul 11, 2024, 01:09 AM