Hi all
I hope this is just a simple one to answer.
I've spent some time searching but havent found this question or answer.
I have:
1000222344
100045566
1000666778
and so on in a txt file (apprx 5000 lines) and would like to search for their occurance in another file csv for example
34666,122,1000222344,yes,no,go
34667,122,100045566,no,yes,stop
I cant do anything within Wild edit as the files are greater than 10kb. I cant do a search in 'Find In files' as I would like to search for everything. Any help is appreciated.
Thanks
Search for multiple lines of text within another file
Moderators: AmigoJack, bbadmin, helios, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
You might be able to record a macro to handle this.
You need to open both files in TextPad:
File1 = Search List and File2 = File to be searched
Then create a macro to do this:
1. Go to top of File1.
2. Copy value into clipboard.
3. Delete that first line
4. Switch to File2 and do search using value copied from File1
5. Switch back to File1.
Run macro as many times as needed until no lines left in File1.
You need to open both files in TextPad:
File1 = Search List and File2 = File to be searched
Then create a macro to do this:
1. Go to top of File1.
2. Copy value into clipboard.
3. Delete that first line
4. Switch to File2 and do search using value copied from File1
5. Switch back to File1.
Run macro as many times as needed until no lines left in File1.
Hope this was helpful.............good luck,
Bob
Bob
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Just had another thought.
You could open File1, and replace "\n" with "|"
Save that whole file string within "(.....)".
Copy that whole string to the clipboard and paste it as a Search expression and use RegEx
Find what: (1000222344|100045566|1000666778|.............. )
Find Next to locate the next instance of any of the strings.
Use the following settings:
-----------------------------------------
[X] Regular expression
-----------------------------------------
You could open File1, and replace "\n" with "|"
Save that whole file string within "(.....)".
Copy that whole string to the clipboard and paste it as a Search expression and use RegEx
Find what: (1000222344|100045566|1000666778|.............. )
Find Next to locate the next instance of any of the strings.
Use the following settings:
-----------------------------------------
[X] Regular expression
-----------------------------------------
Hope this was helpful.............good luck,
Bob
Bob