mameha Posted October 13, 2006 Share Posted October 13, 2006 I am often doing large find/replace commands in Notepad as I convert Excel files before putting into MySQL. I am replacing tab characters with the | character and it is taking 5 mins per file in Notepad.Is there another windows program that can do find/replace faster? Link to comment https://forums.phpfreaks.com/topic/23814-how-to-speed-up-findreplace-in-text-editor/ Share on other sites More sharing options...
neylitalo Posted October 13, 2006 Share Posted October 13, 2006 winVi or vim for Windows - just be prepared to learn :):%s/\t/|/gShould do the trick once you've got the file loaded.Or, if you don't feel like learning Vim, you could always get Textpad (www.textpad.com) and do a regex search and replace on \t to | Link to comment https://forums.phpfreaks.com/topic/23814-how-to-speed-up-findreplace-in-text-editor/#findComment-108167 Share on other sites More sharing options...
mameha Posted October 13, 2006 Author Share Posted October 13, 2006 thanks, actually i just realised i can use the \t mark when importing via phpmyadmin instead of | and save myself a lot of time! Link to comment https://forums.phpfreaks.com/topic/23814-how-to-speed-up-findreplace-in-text-editor/#findComment-108169 Share on other sites More sharing options...
Daniel0 Posted October 13, 2006 Share Posted October 13, 2006 Else you could just copy a tab and paste it into the replace field. Link to comment https://forums.phpfreaks.com/topic/23814-how-to-speed-up-findreplace-in-text-editor/#findComment-108191 Share on other sites More sharing options...
neylitalo Posted October 13, 2006 Share Posted October 13, 2006 [quote author=Daniel0 link=topic=111356.msg451239#msg451239 date=1160718594]Else you could just copy a tab and paste it into the replace field.[/quote]The only problem with that is that tabs may be represented differently - I don't believe databases expand \t to 4 spaces or 8 spaces or whatever. I believe they just leave them as \t, and I wouldn't be surprised if the text editor in use would expand the \t to 4 or 8 spaces or whatever it thinks a tab is. Link to comment https://forums.phpfreaks.com/topic/23814-how-to-speed-up-findreplace-in-text-editor/#findComment-108193 Share on other sites More sharing options...
Daniel0 Posted October 13, 2006 Share Posted October 13, 2006 No, but that doesn't matter. A tab is a tab, but in different editors it is presented different. Sometimes it might be 2, 4 or 8 (or user configurable), but a tab is still = \tBut it is much easier to just write \t if the editor support it. Link to comment https://forums.phpfreaks.com/topic/23814-how-to-speed-up-findreplace-in-text-editor/#findComment-108342 Share on other sites More sharing options...
mameha Posted December 20, 2006 Author Share Posted December 20, 2006 Basically I have since found that Wordpad does find/replace much much faster than notepad.Also, its not necessary to find/replace anyway in this case because you can use \t as the replace character in phpmyadmin. pasting a tab into there wont work by the way. Link to comment https://forums.phpfreaks.com/topic/23814-how-to-speed-up-findreplace-in-text-editor/#findComment-144864 Share on other sites More sharing options...
Daniel0 Posted December 20, 2006 Share Posted December 20, 2006 Why did you bump a topic that is over two months old? Link to comment https://forums.phpfreaks.com/topic/23814-how-to-speed-up-findreplace-in-text-editor/#findComment-145075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.