Today I tried to search for this answer, but the only thing I could remember from it was $_, so I tried to search for this term: https://askubuntu.com/search?q=%24_

To my surprise the result page claimed to search for a single underscore only and didn’t find a single post:

results found containing _

I read the help page and tried to quote the string without any avail, so I got curious:

  • searching for $_results found containing _
    0 results
  • searching for $@ (without single quotes!) → results found containing "$@"
    0 results
  • searching for $*results found containing *
    678,109 results, not necessarily containing either $ or *
  • searching for $1results found containing 1
    91,291 results, exactly like searching for 1

As neither of those searches give the expected result:

How do I properly search for a string containing $ using the site’s search function?

Please do not comment or answer with “Did you try [third-party search engine]?” – I am well aware of google and the like, but if we have a search function it should work properly on its own.

I found meta.SE: Search terms with dollar signs ($) are ignored, but this solution doesn’t work:

The odd thing is: It works well if one searches for the string formatted as code! But we all know, not everybody formats a simply thing like $@ as code every times, plus it may appear in a quotation – there has to be a way to search for it!

| |
  • 1
    Huh. So do we have lousy escaping happening here, or an injection? – Seth Jul 1 '18 at 16:39

The quote trick used to work - it was even documented in the help center!

Somewhere along the line, we dropped support for symbol-searches. Yes, that's annoying, but that's how it is. Until such a time as we're able to devote time and resources to improving search, you'll have to rely on 3rd-party search engines for tasks like these.

If this is ever supported again, we'll update the help center page to reflect that.

| |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .