You are not logged in.
Pages: 1
Is there a way to do the same searches and replacees (for example in Notepad++) within txt files (the content of a text files) you can do in file / folder names? E.g. remove the last 4 characters in each line.
I have any idea of regular expressions.
Last edited by Dirk (2017-04-11 07:28)
Offline
Sure, there are many tools which can do search & replace within files.
Notepad++ is defiantly one of such tools, here is how you do it via its Replace dialog:
Find: ^(.*)....$
Replace: \1
Search mode: Regular expression (. matches new line)
Offline
Thank you very much!
Sorry for my bad expression. I meant, is there a manner to use ReNamer to search and replace in the content of a (text) file, but I assume, there is not. Since I do not have any idea of regular expressions an interface like the one of ReNamer would be good. Or is there another program having such an interface?
Many thanks for the reg. expressions, sorry, I do not make it, there is not anything replaced:
Many thanks again
Offline
If you want the replacement to be applied to every line (I missed that part in your previous post), then untick the option ". matches new line".
ReNamer is not designed for modifying the content of files, so it is better to use some other tool for this task, like Notepad++.
Offline
If you want the replacement to be applied to every line (I missed that part in your previous post), then untick the option ". matches new line".
Sorry again, I had tried that before, I cannot get it to work either, just the single lines are marked after each other.
Offline
I think you are clicking on Find Next button, which only finds the matches.
Try clicking on Replace All button.
Offline
Ah, yes, sorry, you are right, I missed the replace button.
Yes, works great.
Thank you very much
Offline
Pages: 1