Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

I dont know if the search features on most operating system is bogus or I am getting it wrong.

I am looking for a particular file where css property is set like

left:-59px;

I perform search on current folder and type -59px. It give me a bunch of files. The file names does not contain -59 like in auction_rate.html and when I open the file and search for -59px, it says "nothing found".

So my question is, is that search feature really bogus or am I getting it wrong?

share|improve this question
up vote 1 down vote accepted

Well, any typical search engine takes the minus/hyphen as the NOT operator, therefore you're searching for anything not containing what you entered.

In fact, Spotlight supports boolean queries. If you type foo bar, it'll search for foo AND bar. If you type foo | bar, it'll search for foo OR bar. And if you type -59px;, it'll search for NOT 59px;.

To get exactly what you entered, just search for left:-59px;.

share|improve this answer
    
so it search the file contents by default? – Dave Mar 25 '12 at 14:14
    
And the title! You can so custom searches of course. – slhck Mar 25 '12 at 19:52
    
also I could have used "-59x" in quotes – Dave Mar 26 '12 at 1:12

You must log in to answer this question.

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