Edit text files - newbie question

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
somervib
Posts: 1
Joined: Thu Mar 06, 2008 1:52 pm

Edit text files - newbie question

Post by somervib »

Hello,

I've checked through the forum but couldn't find an example of how to remove all but certain characters in multiple files. Here is an example of what I am working with:

325\250.9.98.45.ini(2): 250.9.98.45

Here is what I would like it to look like:

250.9.98.45

I have about 950 files all with this 1 line in which I was able to extract out and create a single file for simplicity and backup.

Again, newbie question so thanks for the help.

Brian
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Use Regular Expressions in Search/Replace:

Search for: ^.*: (.*)
Replace with: \1

==========================
Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------

You can do the replace in all open documents.
You can open multiple documents by starting TextPad calling a list of files to open: textpad.exe @filename

This will open all the files that are listed, one per line, in the specified file.
Hope this was helpful.............good luck,
Bob
Post Reply