Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.