uBlock Origin - Create filter based on href link

I want to create a filter in uBlock for a given website where I know all the ads have an href of the following type containing "referral_story".

<a class="_1oem" href="/marketplace/deals/item/2749298291830360/?referral_story_type=search&amp;referral_code=marketplace_search_evergreen_mixed-serp_all&amp;tracking=browse_rl%3Ab1c8a440-90c3-4646-b026-8f455cfe1066"

How could I write a filter based on this? I have tried

a[href="*referral_story*"]

but this didn't work. I know nothing about the syntax of filters, so any help would be great.


Solution 1:

It's a cosmetic filter, so you need to prefix with the target site.
The rest is standard CSS Syntax.

targetpage.com##a[href*="referral_story"]