70

Do you know how to look for special characters with google...?

I'm looking at bash code and there's the ## operator. I would like to know what It does but I wasn't able to figure out a way to protect the character (I'm not sure it's even possible).

This is particularly annoying when you're looking for some code patterns, some characters are always ignored.

Community
  • 1
  • 1
LB40
  • 12,041
  • 17
  • 72
  • 107
  • 8
    this question, for my opinion is very "relate to programming". try serach for ~ operator in js. – dovid May 14 '15 at 08:45
  • 2
    while limited in its index, http://stackse.com/ is extremely helpful for finding the meaning of special characters in code. – kmote Nov 07 '17 at 18:48
  • 1
    Came here from the linked question to comment that. [stackse](http://stackse.com) is very useful. – inavda Nov 17 '20 at 07:21

2 Answers2

10

Update: this answer is no longer applicable as of 2017. See https://blog.google/products/search/improvements-searching-special-characters-programming-languages/


Google strips most punctuation from queries, as described here, so it won't help you with the bash syntax.

It's very easy to search for the string "##" in the bash documentation: Just run "info bash", hit "s", and enter "##" as the search string.

huyz
  • 2,297
  • 3
  • 25
  • 34
Nathan Kitchen
  • 4,799
  • 1
  • 24
  • 19
  • Do you know the reason why they're doing it ? for the bash info, thx...I already knew it, it was more a general question... – LB40 May 09 '09 at 02:02
  • 1
    They must have decided that the information in punctuation is rarely helpful in searches, and it might also prevent useful matches when it's not the same in the query and the text. – Nathan Kitchen May 09 '09 at 22:20
  • 3
    +1 for "info bash, hit 's'..." I never knew that! thats great! – ash Nov 07 '14 at 22:49
  • 1
    We can now use Google to search for special characters. https://www.blog.google/products/search/improvements-searching-special-characters-programming-languages/amp/. – Weijun Zhou Nov 20 '18 at 14:27
2

google strips puntuation, imho, because:

  • it's somewhere used for special search (chars like - to exclude, +to add and 10..20 to specify a range)
  • to avoid spammers to get email addresses (characters like @ or .) in my experience, it's even impossible to escape special characters. the only solution I found, by now, is using yahoo http://it.search.yahoo.com/
Dakkaron
  • 5,930
  • 2
  • 36
  • 51
alekone
  • 127
  • 3
  • 11
  • While google does have some nice tricks built-in, I think a bit of it just simply how the google search platform "works in general" wrt. indexes and whatnot. –  Jan 13 '11 at 22:05
  • 1
    yes I agree. It's a pain. I have to track a customer name that has special characters on google... and that's nearly impossible (the name without special chars is a common word too... imagine) – alekone Jan 14 '11 at 21:45
  • This does not work for me. Searching for the java annotation "@Singleton" in yahoo includes results of "singleton" – AmanicA Dec 12 '11 at 13:50