48

I tried to find a related question here, but was unsuccessful.

Someone on SO asked what does "!!" mean... I tried searching SO and was presented with the search options page. Even Google fails at this search.

So my question is, is there some way to search for an exact word (in quotes) that won't cause it to fail?

10
  • Search on the trilogy sites isn't always that great... I'm not sure you'll have much luck with it.
    – alex
    Commented Dec 14, 2009 at 14:15
  • meta.stackexchange.com/questions/32181/… Commented Dec 14, 2009 at 21:17
  • 22
    Non-alphanumeric characters are very important in many languages. Not being able to search by these characters makes certain questions impossible to search for.
    – user146487
    Commented Apr 26, 2010 at 18:03
  • 3
    At least they're up-front about it: "Generally, punctuation is ignored, including @#$%^&*()=+[]\ and other special characters." - Google help page
    – Pops
    Commented Jun 23, 2010 at 19:14
  • 8
    status-bydesign, or status-byimplementation? Commented Jun 24, 2010 at 5:33
  • Related question: meta.stackexchange.com/questions/49012/… Commented Oct 21, 2011 at 2:39
  • 3
    One of the bigger failures of SO I've seen. And it's status-bydesign. Unbelievable. Maybe now, when Jeff is not part of the team someone could reconsider this problem... Commented Feb 9, 2012 at 18:32
  • check out stackse
    – ren
    Commented Mar 25, 2016 at 12:40
  • 1
    @Mottie, please remove the "accepted" answer flag, as the described search feature is not working.
    – Cœur
    Commented Feb 24, 2018 at 6:44
  • Using code:"===" still works.
    – Mottie
    Commented Feb 25, 2018 at 16:23

10 Answers 10

14

As part of the latest search engine changes, you can now search for symbols just by using quotes around your term or phrase, like this:

3
16

As a manual solution add a tag with the prefix non-word- from this list:

&  (ampersand)
*  (asterisk)
@  (at-sign)
\  (backslash)
`  (backtick)
!  (bang)
{} (braces)
[] (brackets)
^  (caret)
:  (colon)
,  (comma)
$  (dollar-sign)
.  (dot)
"  (double-quote)
=  (equal-sign)
-  (hyphen)
<  (left-angle-bracket)
() (parentheses)
%  (percent)
+  (plus-sign)
?  (question-mark)
>  (right-angle-bracket)
;  (semi-colon)
#  (sharp)
'  (single-quote)
/  (slash)
~  (tilde)
_  (underscore)
|  (vertical-bar)

The Camel Book Index (Programming Perl) is used for the terminology. For example, tag non-word-tilde-tilde would be used for "~~". This tag would be added to SO question, What does “ ~~ ” mean in Perl?.

Using a tag would allow a person to determine that the dot at the end of this sentence does not get a non-word-dot tag.

Rather than placing tags on an entry simply placing these standard strings in the text would allow the existing search system to match at the author's discretion.

2
  • 3
    can't say I'm a fan of this, and in fact, I'm actually kind of .. heavily against it, looking at your example: stackoverflow.com/questions/3094916/what-does-mean-in-perl it's very noisy. The SymbolHound option in another answer, below, seems like a much more rational choice. Commented Feb 2, 2012 at 17:42
  • 1
    At first glance this looks so "promising" - but crashes and burns with ferocious aplomb - as clarification to such recommendations as "add a tag with the prefix non-word- " never materialize, despite the cute list of words, or are they non-words... and which is which? The rest of it makes me glad I don't live on a Perl monastery... but please, shed some light on this point if theres a ray left... but this has got like, mad cobwebs, yo.
    – alex gray
    Commented Feb 4, 2012 at 21:37
15

It is possible; but not on Google.

A search engine I helped develop, SymbolHound, allows you to search for special characters that are ignored by Google and other engines.

Here's a SymbolHound search for "!!":

6
  • 1
    This got me thinking. How many times in a row are symbols repeated (for drawing a histogram)? I just had fun doing some analysis with this. Unfortunately, I'm getting still more interesting HTTP 500 errors once I'm searching for strings of certain lengths. 163 + symbols in a row breaks (URL of 515 characters), | fails at 217, * fails at 163, = at 325. & works right through until 2725 where it fails with HTTP 414 Request-URI Too Large (the upper limit I had expected). Would you like to fix it, please? :-) Commented Nov 24, 2011 at 9:51
  • (I should specify that this was with using Python with urllib2.urlopen and urllib2.quote. I don't seem to run across these problems using it in Firefox. Not sure what's going on there, then.) Commented Nov 24, 2011 at 11:01
  • @ChrisMorgan I am a co-founder of SymbolHound (tcf is the other). Thanks for pointing this out, I believe I have fixed it. Let me know if it still doesn't work.
    – dncrane
    Commented Nov 24, 2011 at 19:58
  • @dncrane: correct. All working now. Thanks :-) Commented Nov 25, 2011 at 2:58
  • 2
    I really thought SO had this essential capability "pulled together"... as they say... but to the site's credit, I have often been Able to find answers here when other engines came up empty-handed or worse, dumbfounded.. but here I am, like it seems many others were as well... Lured here by the creepy calls of those darn !!'s'! I commend you for having at least an attempt at a valid and useful solution. Just a note... I truly know almost zilch about them... but does Wolfram-Alpha do this kind of thing?
    – alex gray
    Commented Feb 4, 2012 at 21:53
  • It appears it was broken in April 2022. Commented Nov 10, 2022 at 13:42
7

Punctuation marks are normally not indexed. They do not convey information and are used much too often to produce any useful search result.

So in this case Jeff could think about, if he wants to make typical programming constructs searchable (!!, !=, ==, ===, ...). I think a proposal for this already exists, but I can't find it for some weird reasons ;)

2
  • 7
    Unfortunately, sometimes they DO convey information. Try searching for the MS-Access #DELETE problem. I'm sure there's a solution out there, but there appears to be no way to find it. Commented Feb 15, 2011 at 0:19
  • 2
    I DO think this should be written in the FAQ about how to write titles. It's nearly impossible to find Q/A about & | ^ and similar characters.
    – xanatos
    Commented Sep 13, 2011 at 4:58
5

Those with 2k rep and the ability to edit posts should go and verbosify the question text to explain the characters used.

Launch off with the list mentioned by C.W. Holeman II and make it accessible to everyone and anyone.

For example:

What does "!!" operator mean in javascript?

Gets superpowered for reading with an edit such as:

What does the !! operator (double exclamation point) mean in JavaScript?

Another one that would benefit would be something like Difference between || and 'or' in Ruby. Some people call || pipes. Others call it the vertical bars.

Doesn't matter what you drop, so long as you squeeze something out and put it into the bowl. Never hurts to explain those characters you're seeing in English words to help flesh out punctuation marks.

Helps the Google drifters and the users trying out the site search for the first time.

4

Nick Craver commented here that this feature is currently in testing as a Advanced Super Ninja Search Option, code. So to search for !! in code, you run the query code:"!!"

0
4

If you can't search for it in Google, the odds of us being able to search for it are vanishingly slim...

Well, I can search for !! on Google code search:

http://www.google.com/codesearch?q=!!&hl=en&btnG=Search+Code (discontinued March 2013)

Ability to search for programming punctuation would be an obvious improvement to this site.

Note also that Google does match SOME punctuation characters - C++ is the example I'm most familiar with.

2
  • 7
    This will be shut down on January 15 2012. Official notice at: googlesystem.blogspot.com/2011/10/… Commented Oct 15, 2011 at 15:23
  • 2
    @KevinVermeer The whole service will be shut down not ability to use punctuation characters in search term. Your comment is misleading. Commented Feb 9, 2012 at 19:18
1

Try searching for "double exclamation mark" or something like that. Someone writing about this has the reverse problem: how to be found.

this was the 4th link I found.

1

Add another feature to markdown for questions and answers wherein the author identifies character sequences as being indexed and searchable. CSV within braces, {}, would be used to define sequences such that their occurance in the article's code segments would cause the instances to be indexed and searchable.

This markdown would not be displayed but would index the equal-sign, plus-plus and semi-colons in the code fragment:

{=,++,;}

my i = 0; i++;

Then a later markdown would change the sequences to tilde-tilde and at-sign.

{~~,@}

my @results = grep {match_test($_)} @list;

This was provoked by SO answer, @array ~~ $scalar is true when $scalar is in @array.

Then in non-code sections double braces, {{}}, around any text instances would indicate the enclosed sequence is to be indexed and searchable. This sentence is making a made up reference to the {{~~}} in the above Perl fragment. The double braces will cause the tilde-tilde to be indexed and searchable.

1
  • 2
    Nice idea. Better yet just fix the search! :) Commented Feb 9, 2012 at 19:21
-14

If you can't search for it in Google, the odds of us being able to search for it are vanishingly slim...

2
  • 31
    Not necessarily - it would be madness for Google to index things like != or !!, but because SO is targeted specially at programming content SO could index a specific list of programming related constructs and actually have it work successfully. Probably not worth the effort, but still - it could work! :-p
    – Justin
    Commented Dec 14, 2009 at 19:24
  • 2
    However, as maddening itself... as the madness of indexing "such things"… Is the fact that they already DO index them... and yet provide no ways or means, even in some dorky / hideously draconian way... of accessing those toilet-bound "results". it's hysterical "simplicity will save everything" marketing idiots - that think they'll be the next Steve Jobs if they strip enough features off of whatever bullsh*t product they're working on.. instead of implementing solutions that are unobtrusive and adaptable to various tastes and skills of those for which they were designed.
    – alex gray
    Commented Feb 4, 2012 at 22:05

You must log in to answer this question.

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