If you're typing strings which include the * character, you must either escape it with a \ (\*) or write it in a code block.
I STRONGLY recommend the latter.
I think what you're trying to write is:
google.*##.g:has(a[href=*"pinterest.com"])
(I'm inferring that based on the italic/roman text in your pattern line. I'm probably inferring wrong.)
HN's markup interpreter will style any line indented by two or more spaces as code, and not interpret special symbols. The lines will wrap, however (wrapping is a relatively new feature).
google.##.g:has(a[href="pinterest.com"])
google.##.g:has(a[href="*.pinterest.com"])
dunno. i primarily use duck which apparently does not show that many pinterest results and even that one didn't work. i would have to investigate