Cleaning + Extracting Cards Tutorial
I've been playing around with Notepad++ since reading Miro's lovely tutorial on macros, and I've come up with something to make searching for cards in Recycled Art or others' trade posts a bit easier. I hope this will be helpful!
This tutorial will allow you to quickly convert some source HTML into a nice clean list of cards, with cards you're looking for highlighted. So basically, we will turn this mess...

... into this, a cleaned up list with decks I'm looking for marked in red.

OR we could extract the cards marked above...

Into a lovely list like this! Ooooooh. With just a few (sort of) simple steps!
This tutorial requires the creation/use of macros - Miro's tutorial provides an excellent introduction to macros, so have a read if you haven't already. This tutorial uses something called regular expressions (also known as regex) - I'm new to regex so if you have any suggestions on ways to improve this, please let me know! I'm also not a computer scientist so please forgive me if I've butchered any terminology. :P
I created this using Notepad++ version 7.3 on Windows. I might have a go at this on my super old Macbook and see if I can get it to work, though I suspect the same regex codes can be used on Mac.
A heads up, be careful when copying and pasting regex code - make sure you don't accidentally include any unnecessary spaces before/after the code, as the tutorial will not work. Just copy the text that is bolded and underlined.
I've divided this tutorial into four sections:
I. Cleaning source HTML
II. Marking cards
IIIa. Extracting (exhibit B above)
IIIb. Creating a marked list (exhibit A above)
I recommend making a separate macro for each step. It's likely that once you create a macro for steps I, IIIa and IIIb, you won't need to update them again. However, step II (marking cards) is where you will specify that decks/cards you're looking for, so that will probably be updated on a regular basis. Note that once you've done steps I and II, you can only do either IIIa or IIIb (i.e. you can only extract the cards or create a marked list of cards, and not both. Not that you would ever need to do both!)
Let's get started!

Here's the source HTML from the trading section of my post that I've copied and pasted into Notepad++. It's pretty ugly looking right now, so let's clean it up! A simple find and replace unfortunately will not suffice here because of the title text inserted by etcg. Also, there's some random HTML code in there - the list of cards was pretty big, and I didn't feel like scrolling to get to the bottom, so I just selected everything. Good thing this tutorial will clean up all the useless code! :P This will be especially helpful when the post you're looking through has cards on multiple pages, as you can simply just paste all the HTML code one on top of the other. This tutorial will also remove any headers that may exist between cards.

We will now be creating the macro for cleaning up HTML, so start recording a new macro. First, we are going to replace each > in the file with a new line. This will make cleaning up the code a lot easier. Open up the Replace window by going to Search > Replace or hitting Ctrl+H. Put (>) in the "Find what" section and \n in the "Replace with" section. Make sure that "Regular Expression" and "Wrap Around" are selected. Press Replace All.

This is the result! All the > symbols are now replaced with a line break.

Now, let's get rid of all the non-image codes. Put ^(?!.*gif.*).+$ in the "Find what" section and replace it with nothing (empty textbox in "Replace what" section). This will replace any lines not containing ".gif" with an empty line. Press Replace All.

This is the result!

Let's delete all the empty lines. Replace ^[ \t]*$\r?\n with nothing (empty textbox), press Replace All.

Boom! Now all the blank lines have been deleted.

Now, we are going to keep everything in each line but the deck name and number. Replace ^.+\/(.*)\.gif.*$ with \1, and hit Replace All. Make sure you include a single space in front of the \ in the "replace with" text box.

Now we have a clean(ish) list of all the cards! The list needs to be in this format in order for the rest of the tutorial to work.
That's the end of the cleaning section of the tutorial! I recommend saving steps 1-4 as a macro.
We are going to use what I'll call "search strings" to go through our pretty new list of cards and mark the ones we're looking for.
Here is a sample search string: \s(ace|over|agility)\d{2},
This search string will automatically mark any ace, over, or agility cards in our list. We can definitely add more decks to the list, but for this example I will be using just the three. In any search string, the \s and \d{2}, will always be present at the start and end of the search string, respectively. It is the the text in between the parentheses where you will specify the cards you're looking for. Each deck name must be separated by a | symbol and there cannot be any spaces in the list.
If you're interested, I've provided a breakdown detail of how the search string works in the smaller text below. However, it's not necessary for the tutorial, so feel free to move along to the next part!
Breakdown of search string:
• \s - search for blank space
• (ace|over|agility) - list of deck names we're looking for. This string will look for ace, over or agility cards. The | symbols are "or" operators - make sure you don't accidentally include two | symbols between each deck name, and make sure there are no spaces anywhere in the list. Also make sure that the list is enclosed by parentheses.
• \d{2} - search for 2 digits (0-9)
• , - searches for a comma
The leading space in the front ensures that we only keep cards that begin with our deck name of interest (e.g. if we're looking for ace, we don't want to select space or face cards). The \d{2} ensures that we select text that contain our deck name of interest that is followed by 2 digits, so we don't get deck names that start with our deck name of interest but contain other letters as well (e.g. for ace, we don't want to select aces, acepilot). The comma at the end is probably unnecessary, but I've included it just to be safe. The comma ensures we don't inadvertently highlight deck names that contain our deck name of interest + numbers at the end (e.g. if we search for over, the "over90" of any over9000 cards will be highlighted since it is technically a card beginning with "over", followed by 2 digits)
Let's start marking the cards we're looking for! Let's try the sample search string above. Again, it will mark all ace, over or agility cards in the list. When creating your macro, you would start recording your macro now, but enter your own search strings rather than the examples I'm using in this tutorial.

We will be using the Mark feature in Notepad++. You can get to it by going to Search > Mark, or use Ctrl+F or Ctrl+H to open the Find/Replace window, and select the Mark tab. Make sure that "Bookmark Line", "Wrap Around" and "Regular Expression" are selected. Paste your search string into the "Find what" textbox and hit Mark All.
You can follow this tutorial to create a keyboard shortcut to open up the Mark menu and save yourself some clicks! Mark is #102 in the Main Menu list

ace04 has been marked! Yay! Notice how ace04 was highlighted but aces03 was not, meaning the search string correctly captured the decks we're actually looking for. If there were any agility or over cards in the list, they too would be marked.
A nice thing about the Mark feature is that previously marked works will remain marked if you search for a new string. This will allow us to search for and mark multiple search strings. This is good news for us, because the "Find what" textbox has a character limit of 2,049 characters and therefore you will probably have to create multiple strings to mark everything you're looking for. When creating your search strings, an easy way to keep track of the number of characters in your string is to select all the text and look at the number beside "Sel" at the bottom of Notepad++ (see image below).
A handy feature about Notepad++ is the ability to have multiple files open in separate tabs. Below, you can see I created some search strings and stuck them all in one document. I arbitrarily chose to sort mine by category (collecting/future pile, etc), but do whatever works best for you. Note that the way you organize your search strings ultimately doesn't matter, since we'll be applying them all and saving everything into a macro, so you can have as many search strings as you'd like. You can play around with the strings a bit - I came up with some ideas here.

Now, let's look for the cards in my "Keeping Regulars" list (above). Let's copy and paste this search string into the Mark function, hit Mark All, and...


... ta-da! All the decks from the post that match the decks in the search string are marked! The ace04 from the first search is still marked, but now the bite card, which was contained in my search string, has also been marked.
Let's search for some more cards! I created a search string for cards in my "collecting" section - let's search for them...



And boom! I had accounts and adepts in my search string, and now they are highlighted. bite17 and aces04 are still highlighted from before. We can keep entering search strings until we've gone through all of them. There doesn't appear to be a limit on the number of strings we can search and mark, so create as many as your heart desires. Once you have entered all your search strings, stop recording and save the macro. Now that you've saved it as a macro, you can easily and quickly highlight all the cards you're looking for!
Make sure you keep your search strings handy, because if you change your list of decks, you will need to re-record the marking macro. For instance, say I mastered the ace deck. I won't want to mark it anymore, so I would update my sample search string from \s(ace|over|agility)\d{2}, to \s(over|agility)\d{2},. I would need to re-create the macro to replace the search string. I think the easiest way to do this is to simply delete the original macro and record a new one, since it seems actually modifying macros is a pain in the butt. Fortunately, creating the macro is quick as all you have to do is copy and paste your search string into the Mark function, hit Mark All, and repeat until you've gone through all the strings~
Now, let's clean this up some more! If you want to extract all the marked cards, read section IIIa (steps 6-7). If you want to have the retain the original list of cards with your cards of interest marked, read section IIIb (step 8).

Let's extract the marked cards. Start recording your macro now. Go to Search > Bookmark > Remove Unmarked Lines.

All the unmarked lines have been removed! Yay!

Let's clean up the list. Open up Replace and replace \s+ with a single space.

Ta-daaaa, a cleaned up list of all my marked cards! Note that by default Notepad++ will keep everything marked - above I chose to unmark all cards (Mark > Clear All Marks) since all the red drives me nuts. Anyways, save steps 6 and 7 into a macro, and you've got yourself a quick way to extract marked cards!
I'm unsure if anyone will have a use for this, but I'm including it anyways~

Start recording the macro now. We have our list of marked cards obtained from Step 5. Open up Replace and replace \s+ with a single space.

Here's our list! All the cards we searched for remain marked, however we now also have a list of all the other cards in the trade pile or Recycled Art. Save your macro and you're done. \o/
So those are the steps! Let's apply parts I, II and IIIa to Recycled Art~

Here I've copied and pasted ALL the HTML from sections #-B, C-F and G-J of Recycled Art because I really wanted to test this thing out. :P
Apply the cleaning macro to get...

(the cleaning macro may take a few seconds if it's a really long list!)
Apply the marking macro to get...

(I scrolled down to show that decks were highlighted - nothing was deleted)
Finally, apply the extracting macro to get...

The whole process took maybe 10 seconds! Obviously, it will take some time to set up your search strings, but to me it's worth it~
And voila! By running a couple macros in Notepad++, you can quickly highlight cards you're looking for in Recycled Art or someone's trade pile! \o/ No more eyes glazing over from looking through thousands of card names! Yay!
Please let me know if you have any questions or suggestions! It's my first time coming up with something like this so all feedback is welcome. ♥
This tutorial will allow you to quickly convert some source HTML into a nice clean list of cards, with cards you're looking for highlighted. So basically, we will turn this mess...

... into this, a cleaned up list with decks I'm looking for marked in red.

OR we could extract the cards marked above...

Into a lovely list like this! Ooooooh. With just a few (sort of) simple steps!
This tutorial requires the creation/use of macros - Miro's tutorial provides an excellent introduction to macros, so have a read if you haven't already. This tutorial uses something called regular expressions (also known as regex) - I'm new to regex so if you have any suggestions on ways to improve this, please let me know! I'm also not a computer scientist so please forgive me if I've butchered any terminology. :P
I created this using Notepad++ version 7.3 on Windows. I might have a go at this on my super old Macbook and see if I can get it to work, though I suspect the same regex codes can be used on Mac.
A heads up, be careful when copying and pasting regex code - make sure you don't accidentally include any unnecessary spaces before/after the code, as the tutorial will not work. Just copy the text that is bolded and underlined.
I've divided this tutorial into four sections:
I. Cleaning source HTML
II. Marking cards
IIIa. Extracting (exhibit B above)
IIIb. Creating a marked list (exhibit A above)
I recommend making a separate macro for each step. It's likely that once you create a macro for steps I, IIIa and IIIb, you won't need to update them again. However, step II (marking cards) is where you will specify that decks/cards you're looking for, so that will probably be updated on a regular basis. Note that once you've done steps I and II, you can only do either IIIa or IIIb (i.e. you can only extract the cards or create a marked list of cards, and not both. Not that you would ever need to do both!)
Let's get started!
I. CLEANING UP SOURCE HTML
STEP 1

Here's the source HTML from the trading section of my post that I've copied and pasted into Notepad++. It's pretty ugly looking right now, so let's clean it up! A simple find and replace unfortunately will not suffice here because of the title text inserted by etcg. Also, there's some random HTML code in there - the list of cards was pretty big, and I didn't feel like scrolling to get to the bottom, so I just selected everything. Good thing this tutorial will clean up all the useless code! :P This will be especially helpful when the post you're looking through has cards on multiple pages, as you can simply just paste all the HTML code one on top of the other. This tutorial will also remove any headers that may exist between cards.

We will now be creating the macro for cleaning up HTML, so start recording a new macro. First, we are going to replace each > in the file with a new line. This will make cleaning up the code a lot easier. Open up the Replace window by going to Search > Replace or hitting Ctrl+H. Put (>) in the "Find what" section and \n in the "Replace with" section. Make sure that "Regular Expression" and "Wrap Around" are selected. Press Replace All.

This is the result! All the > symbols are now replaced with a line break.
STEP 2

Now, let's get rid of all the non-image codes. Put ^(?!.*gif.*).+$ in the "Find what" section and replace it with nothing (empty textbox in "Replace what" section). This will replace any lines not containing ".gif" with an empty line. Press Replace All.

This is the result!
STEP 3

Let's delete all the empty lines. Replace ^[ \t]*$\r?\n with nothing (empty textbox), press Replace All.

Boom! Now all the blank lines have been deleted.
STEP 4

Now, we are going to keep everything in each line but the deck name and number. Replace ^.+\/(.*)\.gif.*$ with \1, and hit Replace All. Make sure you include a single space in front of the \ in the "replace with" text box.

Now we have a clean(ish) list of all the cards! The list needs to be in this format in order for the rest of the tutorial to work.
That's the end of the cleaning section of the tutorial! I recommend saving steps 1-4 as a macro.
II. MARKING CARDS
We are going to use what I'll call "search strings" to go through our pretty new list of cards and mark the ones we're looking for.
Here is a sample search string: \s(ace|over|agility)\d{2},
This search string will automatically mark any ace, over, or agility cards in our list. We can definitely add more decks to the list, but for this example I will be using just the three. In any search string, the \s and \d{2}, will always be present at the start and end of the search string, respectively. It is the the text in between the parentheses where you will specify the cards you're looking for. Each deck name must be separated by a | symbol and there cannot be any spaces in the list.
If you're interested, I've provided a breakdown detail of how the search string works in the smaller text below. However, it's not necessary for the tutorial, so feel free to move along to the next part!
Breakdown of search string:
• \s - search for blank space
• (ace|over|agility) - list of deck names we're looking for. This string will look for ace, over or agility cards. The | symbols are "or" operators - make sure you don't accidentally include two | symbols between each deck name, and make sure there are no spaces anywhere in the list. Also make sure that the list is enclosed by parentheses.
• \d{2} - search for 2 digits (0-9)
• , - searches for a comma
The leading space in the front ensures that we only keep cards that begin with our deck name of interest (e.g. if we're looking for ace, we don't want to select space or face cards). The \d{2} ensures that we select text that contain our deck name of interest that is followed by 2 digits, so we don't get deck names that start with our deck name of interest but contain other letters as well (e.g. for ace, we don't want to select aces, acepilot). The comma at the end is probably unnecessary, but I've included it just to be safe. The comma ensures we don't inadvertently highlight deck names that contain our deck name of interest + numbers at the end (e.g. if we search for over, the "over90" of any over9000 cards will be highlighted since it is technically a card beginning with "over", followed by 2 digits)
STEP 5
Let's start marking the cards we're looking for! Let's try the sample search string above. Again, it will mark all ace, over or agility cards in the list. When creating your macro, you would start recording your macro now, but enter your own search strings rather than the examples I'm using in this tutorial.

We will be using the Mark feature in Notepad++. You can get to it by going to Search > Mark, or use Ctrl+F or Ctrl+H to open the Find/Replace window, and select the Mark tab. Make sure that "Bookmark Line", "Wrap Around" and "Regular Expression" are selected. Paste your search string into the "Find what" textbox and hit Mark All.
You can follow this tutorial to create a keyboard shortcut to open up the Mark menu and save yourself some clicks! Mark is #102 in the Main Menu list

ace04 has been marked! Yay! Notice how ace04 was highlighted but aces03 was not, meaning the search string correctly captured the decks we're actually looking for. If there were any agility or over cards in the list, they too would be marked.
A nice thing about the Mark feature is that previously marked works will remain marked if you search for a new string. This will allow us to search for and mark multiple search strings. This is good news for us, because the "Find what" textbox has a character limit of 2,049 characters and therefore you will probably have to create multiple strings to mark everything you're looking for. When creating your search strings, an easy way to keep track of the number of characters in your string is to select all the text and look at the number beside "Sel" at the bottom of Notepad++ (see image below).
A handy feature about Notepad++ is the ability to have multiple files open in separate tabs. Below, you can see I created some search strings and stuck them all in one document. I arbitrarily chose to sort mine by category (collecting/future pile, etc), but do whatever works best for you. Note that the way you organize your search strings ultimately doesn't matter, since we'll be applying them all and saving everything into a macro, so you can have as many search strings as you'd like. You can play around with the strings a bit - I came up with some ideas here.

Now, let's look for the cards in my "Keeping Regulars" list (above). Let's copy and paste this search string into the Mark function, hit Mark All, and...


... ta-da! All the decks from the post that match the decks in the search string are marked! The ace04 from the first search is still marked, but now the bite card, which was contained in my search string, has also been marked.
Let's search for some more cards! I created a search string for cards in my "collecting" section - let's search for them...



And boom! I had accounts and adepts in my search string, and now they are highlighted. bite17 and aces04 are still highlighted from before. We can keep entering search strings until we've gone through all of them. There doesn't appear to be a limit on the number of strings we can search and mark, so create as many as your heart desires. Once you have entered all your search strings, stop recording and save the macro. Now that you've saved it as a macro, you can easily and quickly highlight all the cards you're looking for!
Make sure you keep your search strings handy, because if you change your list of decks, you will need to re-record the marking macro. For instance, say I mastered the ace deck. I won't want to mark it anymore, so I would update my sample search string from \s(ace|over|agility)\d{2}, to \s(over|agility)\d{2},. I would need to re-create the macro to replace the search string. I think the easiest way to do this is to simply delete the original macro and record a new one, since it seems actually modifying macros is a pain in the butt. Fortunately, creating the macro is quick as all you have to do is copy and paste your search string into the Mark function, hit Mark All, and repeat until you've gone through all the strings~
Now, let's clean this up some more! If you want to extract all the marked cards, read section IIIa (steps 6-7). If you want to have the retain the original list of cards with your cards of interest marked, read section IIIb (step 8).
IIIa. EXTRACTING CARDS
STEP 6

Let's extract the marked cards. Start recording your macro now. Go to Search > Bookmark > Remove Unmarked Lines.

All the unmarked lines have been removed! Yay!
STEP 7

Let's clean up the list. Open up Replace and replace \s+ with a single space.

Ta-daaaa, a cleaned up list of all my marked cards! Note that by default Notepad++ will keep everything marked - above I chose to unmark all cards (Mark > Clear All Marks) since all the red drives me nuts. Anyways, save steps 6 and 7 into a macro, and you've got yourself a quick way to extract marked cards!
IIIb. CREATING A MARKED LIST
I'm unsure if anyone will have a use for this, but I'm including it anyways~
STEP 8

Start recording the macro now. We have our list of marked cards obtained from Step 5. Open up Replace and replace \s+ with a single space.

Here's our list! All the cards we searched for remain marked, however we now also have a list of all the other cards in the trade pile or Recycled Art. Save your macro and you're done. \o/
So those are the steps! Let's apply parts I, II and IIIa to Recycled Art~

Here I've copied and pasted ALL the HTML from sections #-B, C-F and G-J of Recycled Art because I really wanted to test this thing out. :P
Apply the cleaning macro to get...

(the cleaning macro may take a few seconds if it's a really long list!)
Apply the marking macro to get...

(I scrolled down to show that decks were highlighted - nothing was deleted)
Finally, apply the extracting macro to get...

The whole process took maybe 10 seconds! Obviously, it will take some time to set up your search strings, but to me it's worth it~
And voila! By running a couple macros in Notepad++, you can quickly highlight cards you're looking for in Recycled Art or someone's trade pile! \o/ No more eyes glazing over from looking through thousands of card names! Yay!
Please let me know if you have any questions or suggestions! It's my first time coming up with something like this so all feedback is welcome. ♥
OTHER SEARCH STRINGS
Specific cards:
Sample string: \s(distanced02|dolphin19)
If you're only missing a few cards from a deck, you might want to search for the specific cards, rather than just deck name + any card number. The above string will search for distanced02 or dolphin19. There is no \d or comma at the end of the string since we are capturing the deck name + specific card number, rather than deck name + any card number.
Mega Man decks:
Sample string: \s(dln|dcn|mkn)\-\d{5}
From what I can see, a lot of the Mega Man decks are 3 letters, followed by a dash and 3 numbers. The above string will search for decks beginning with dln OR dcn OR mkn, followed by a dash (\-), and followed by five numbers (3 numbers from deck name + 2 numbers for card number). This way, you don't have to put together a list of every single deck out there.
Pretty Cure decks:
Sample string: \s(cure)\w+\d{2}
A lot of the Pretty Cure decks begin with the word cure, e.g. cureblack, curescarlet. Rather than having to put all of them in a single group ((cureblack|curescarlet|curewhite) and so on), we can use the above code. What it does is searches for all occurrences of "cure" followed by any letters or digits (\w+), followed by 2 digits.
If you want to only search for occurrences of "cure" followed by letters ONLY, replace \w+ with [a-z]+