Nice try, ad company.
Explain Like I'm Five
Simplifying Complexity, One Answer at a Time!
Rules
- Be respectful and inclusive.
- No harassment, hate speech, or trolling.
- Engage in constructive discussions.
- Share relevant content.
- Follow guidelines and moderators' instructions.
- Use appropriate language and tone.
- Report violations.
- Foster a continuous learning environment.
Lol
Regular expression magic.
A lot of ad networks have a pattern to the name or the window the advert appears in.
Using regular expression you can find just the adwindow and ignore the actual content.
Now what is regular expression? A wizard language.
ask any programmer about RE after 4 beers and watch the hate wash over their face.
I love regex, I'm not even gonna lie. To be fair, my expressions haven't been 50+ characters long, but still.
Regex absolutely has many great uses. The issue is people trying to use for things they shouldn't. Then it suddenly becomes a nightmare.
Can I parse [X]HTML with regex?
You can parse any plaintext with regex, but I would recommend using XPath for that use case, instead.
Same, I've never understood the hate. But then again I memorize based off of patterns and regex in my brain is just a pattern.
I used to play regex games online lol. I once wrote a pattern for work that was ~200 characters. I loved doing it lol.
Seems like an interesting way to learn. Do you remember any of them?
The first language I learned was Perl, so regex are very close to my heart. I'm also quite excitable when I drink (I'm a happy drunk), so ask me and I'll give you a very enthusiastic explanation while not noticing that you aren't interested in my detailed explanation and examples. Do it. I dare ya.
🍻
Zawinski’s second law - “Sometimes a person looks at a problem and says ‘I know what I’ll do, I’ll use regular expressions’. And now they have two problems.”
Decade of c# game design under my belt, but never dealt with web scripting. Am I missing out?
You are missing out on headaches.
Nerds. Hundreds and hundreds of them.
As someone who runs a popular blocklist collection, I've come to find that most of the MASSIVE lists are people who collate a whole bunch of lists together and then promote their "one size fits all" solution alongside their donation link. There are very few original high quality ad-blocking lists maintained (where originality is defined as a sizeable amount of unique entries not shared by other lists) and almost all don't appear to openly discuss the magic sauce behind their lists, outside of the obvious case of user submissions.
The easy way would be to make a website sign up for all the ads and see what happens. Subtract your website from the data and there's the ads.
The real answer will probably end up being that they ARE the ad companies in disguise.