hi,
I've been a user of Textpad for some time. One thing I've never quite had a chance to figure out is the ability (if it exists) to run multiple search items at once. For example, how would I take a text file with line by line entries and have Textpad run all those entries against a file opened in textpad. I use Textpad to parse log data, and would be extremely beneficial for me to be able to do so. Anyone know how to do this?
Thanks in advance.
Multiple item - single search
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
I suspect that nobody replied last time because it's not particularly simple. Here's a slightly non-simple way to do it:
In the file containing the search strings, run the following search and replace:
Copy the lot, switch to the other file, open the "Find" dialogue box, paste the search expression into it, and run a search, again with "Regular expression" selected.
You'll need to adjust the search expression if any of the search strings contain special regular expression characters.
This assumes you are using POSIX regular expression syntax:
In the file containing the search strings, run the following search and replace:
Remove the trailing | (if there is one) from the result.Find what: \n
Replace with: |
[X] Regular expression
Copy the lot, switch to the other file, open the "Find" dialogue box, paste the search expression into it, and run a search, again with "Regular expression" selected.
You'll need to adjust the search expression if any of the search strings contain special regular expression characters.
This assumes you are using POSIX regular expression syntax:
Believe it or not, I do this sort of thing quite often...Configuration | Preferences | Editor
[X] Use POSIX regular expression syntax
-
- Posts: 24
- Joined: Wed Oct 01, 2003 2:24 pm
- Location: United Kingdom
- Contact:
Parsing log file data
Off-topic as regards Textpad, but you might wish to consider DataMystic TextPipe for parsing log files.I found TextPipe Standard was a ready made solution to process CSV files that had more than 256 fields, so that I could open them using Excel.
Best regards,
David F Haslam, MA, CEng, MIEE
David F Haslam, MA, CEng, MIEE