113

I want to search for what += means, but Google won't return any documents.

Also when I come across some PHP code I don't understand I can't search for the keywords as written.

How can I search for these special characters or include these special characters in a search.

9
  • 3
    Lol, you get 10 results if you include it in quotes, none of them containing the string ;-).
    – Gamecat
    Jul 31, 2009 at 14:02
  • 1
    I get the error "$# is no longer supported" on Perl 5.10
    – Brad Gilbert
    Jul 31, 2009 at 14:05
  • 3
    Somebody claim those bonus points. I've worked with perl but I've never reached the level where this code snippet would be comprehensible to me. You can tell, because I'm still sane.
    – quillbreaker
    Jul 31, 2009 at 14:07
  • 14
    I think you forgot to post the code and just mashed your keyboard.
    – Salgar
    Jul 31, 2009 at 14:16
  • x += y is the same as x = x+y, but you probably already figured that out. Oct 5, 2011 at 22:57

15 Answers 15

8

Just announced by Google, searching for special characters is greatly improved.

The catch? You need to search for at least two or three characters.

Now for queries containing sequences of 2-3 special characters such as [== vs ===] and [+=], Google will return results on the meaning of these sequences in programming languages.

For example, if you’re searching for the meaning of [c++17], you will get results for the well-known programming language instead of c17, which brings up a Boeing airplane. Additionally, organization and product names that include punctuation, such as She++ and Notepad++, will return more accurate results.

+= is even called out specifically as an example string.

As with all Google improvements, this is likely rolling out in stages, and may not be available in all languages.

2
  • 4
    As of today, it's still not rolled out. Searching for C++17 still gives results for Boeing C-17 Globemaster III.
    – duplex143
    Apr 12, 2020 at 5:24
  • It works with many symbols now, but it still ignores the "@" symbol in search queries. Jun 20, 2020 at 13:32
48

Unfortunately, this is not possible.

From the official Google Help Page:

Generally, punctuation is ignored, including @#$%^&*()=+[]\ and other special characters

I would try looking at other search engines or resources that might be helpful. Something like GitHub might be useful.

Sources from Google Help Forum:

5
25

Please note:

Originally, this question was posted to Stackoverflow with the title "How can I search for -f>@+?*<.-&'_:$#/%! on Google?" or something similar. Someone hastily decided the question was not a programming question, and it has been kicked around, changed, merged, morphed several times since then. My answer has moved around with it. See also What is "-f>@+?*<.-&'_:$#/%!" in Perl?

To this day, the search for that fairly distinct string produces no results in Google despite the existence of this answer and the blog post giving it context.

Write it out:

-f: perldoc -f -X. If no file name is specified (as is the case here) checks if $_ contains the name of a plain file

>: Checks if the RHS is greater than the LHS

@+: In scalar context, returns the number of elements in @+

?: the conditional operator

*<: The glob for main::<

.: String concatenation operator

-&'_: Invokes a subroutine main::_. FYI, ' is the perl4 style package name separator. Try perl -MHTML'Template -e 1.

: : Continuing with conditional operator

$# : The output format for printed numbers

/ : Division operator

%! : %ERRNO; see perldoc perlvar

So, it is not impossible to understand if you put a little effort into it. Clearly, this is not how anyone should write programs, but there some benefit from people pushing the boundaries.

7
  • Wow, bravo. I missed $# (deprecated?) and -&'_.
    – Mark Canlas
    Jul 31, 2009 at 15:13
  • @Mark thanks. $# no longer exists. I do not know when it was phased out. Searching Google for google.com/search?q=perl4+%24%23 led me to it. Jul 31, 2009 at 15:19
  • 1
    Neat, but could you clarify how does this help with searching for a keyword with special characters in Google Search? Cheers!
    – sdaau
    Feb 23, 2015 at 22:00
  • 2
    @sdaau Originally, this question was posted to Stackoverflow with the title "How can I search for "-f>@+?*<.-&'_:$#/%!" on Google?` or something similar. Someone hastily decided the question was not a programming question, and it has been kicked around, changed, merged, morphed several times since then. My answer has moved around with it. See also What is "-f>@+?*<.-&'_:$#/%!" in Perl?. Feb 24, 2015 at 1:59
  • 1
    @JakeRobb The code does not do anything useful and should not be used. It's an example of a line-noise looking sequence of characters that still turns out to be valid Perl with a not so subtle dig towards Perl's readability. But, this is an archeological discussion. Both the question and the answer should have remained on Stackoverflow where the context really was not about a practical way to search Google. But, that ship has sailed. To emphasize: No one should write code like this in any language. Dec 28, 2022 at 14:41
20

You can use http://www.symbolhound.com [disclosure: I am a developer for the site]

Unlike Google (even codesearch) SymbolHound includes special characters and symbols in a web search. ex: @#$%^&*()=+[]\ etc.

You should be able to find results for += http://symbolhound.com/?q=%2B%3D The index is constantly growing, so each day the results will be more and more relevant.

I hope this answers your question! Best of luck

3
13

I noticed that some words with punctuation are indexed.

For example:

  • C++
  • i++
  • Micro$oft

Here's Google's official documentation of this feature:

Punctuation that is not ignored

  • Punctuation in popular terms that have particular meanings, like [ C++ ] or [ C# ] (both are names of programming languages), are not ignored.
  • The dollar sign ($) is used to indicate prices. [ nikon 400 ] and [ nikon $400 ] will give different results.
  • The hyphen - is sometimes used as a signal that the two words around it are very strongly connected. (Unless there is no space after the - and a space before it, in which case it is a negative sign.)
  • The underscore symbol _ is not ignored when it connects two words, e.g. [ quick_sort ].
9

Sorry, you can't. The inability to search for line noise on Google is the bane of programmers. Try looking for articles about A* search sometime.

7
  • This seems to get plenty of results: google.com/search?q="a+star"+search+algorithm
    – Jon Skeet
    Jul 31, 2009 at 14:07
  • 6
    Makes me miss AltaVista
    – Eli
    Jul 31, 2009 at 14:08
  • The trick is word and character distance and association. A search for "a* search"brings up the Wikipedia page as the first relevant result. It may treat the "*" as a space, but it works due to the association with "search".
    – Killroy
    Jul 31, 2009 at 14:09
  • Interestingly searching for "A*" on Bing yields the Wikipedia page as the first result, Google gives me a bunch of noise. Maybe locally relevant noise for "A" but not what I wanted :)
    – Joey
    Aug 3, 2009 at 19:41
  • Google does have some special cases for some punctuation. A search for C# turns up expected results. Shame A* doesn't.
    – Nelson
    Aug 31, 2009 at 20:12
7

Google does this now, see Improvements to searching for special characters in programming languages

For those seeking answers to technical queries, Google just upped its search game. Now for queries containing sequences of 2-3 special characters such as [== vs ===] and [+=], Google will return results on the meaning of these sequences in programming languages.

1
  • Current and relevant in 2017 compared to the now invalid comments and info from previous years.
    – TonyG
    Dec 23, 2017 at 19:51
5

Well, you can bing it by putting quotes around it, but it doesn't seem to come up with anything relevant:
http://www.bing.com/search?q="-f>@%2B%3F*<.-%26'_:$%23/%25!"

A google search also came up with irrelevant results until I added "perl" to the query, in which case it actually came up with a stackoverflow question about your favorite programmer joke which had that string:
http://www.google.com/search?q="-f>@%2B%3F*<.-%26'_:$%23/%25!"+perl

1
  • These days, I get "Your search - "-f>@+?*<.- - did not match any documents." on Google; cheers!
    – sdaau
    Feb 23, 2015 at 22:03
5

Google doesn't search for punctuation characters as far as I know. In this case what you might want to try is to search with a description of your characters: something like plus equals or plusequals. That will probably find you something, especially if you add the programming language to your query (PHP in this case).

1
  • This is a good approach, but you will probably also get many unrelated answers. For this particular case, you're lucky, because if you search for plusequal in Google, the first hit is to this article: += plus equal sign - C / C++ answers, which is probably a good answer to what you want.
    – awe
    Apr 19, 2011 at 7:22
4

https://duckduckgo.com handled my search for "Redis::Queue" properly (not ignoring ::).

1

Ask a question about it on superuser.com and wait for Google to index it. I just found this page by googling "-f>@+?*<.-&'_:$#/%!" (with the quotes).

The resulting search page URL is http://www.google.ca/search?q="-f>@%2B%3F*<.-%26'_:$%23/%25!"

0

I thought if you placed something in quotes it would force a search of that exact term.

ie searching for

"C++"

would search for C++ and not just C

1
  • 2
    This is because the phrase C++ is indexed specially. You actually don't need the quotes. See the answer from Senseful. So the C++ gets valid hits for C++ (not C and C#) because it is indexed, but "1+2" ignores the + and returns all that contain 1 and 2 because 1+2 is not indexed.
    – awe
    Apr 19, 2011 at 7:31
0

You can just use words to spell out the symbols and do the search that way.

i.e. for +=, you can search for plus equal.

Google seems to do the right thing when you search this way.

0

Did you try searching with double quotes like "+=". I did get back results for += when I used Double quotes.

https://www.google.com/search?q="+="
-1

It seems that almost no one has understood the ops question. He is not asking how to use += as part of a Google search. He is asking how he might search for the definition of += in a search engine that largely ignores special characters.

@ChrisF, you need to first understand what you're searching on in order to better phrase your query.

+= is a common assignment operator in almost any language. If you're specifically after a PHP definition then you might try PHP assignment operators. For string concatenation you would use .= which loosely translates to and equals.

For integers it would perform a mathematical operation. Refer this link for more information.

1
  • Has this been down voted due to the pointless editing because I can see no other reason. :\
    – Panoone
    Jul 2, 2015 at 3:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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