115

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.

4
  • possible duplicate of How to search the internet for terms with special characters
    – ale
    Nov 19, 2012 at 20:01
  • You could search += in Wikipedia.org.
    – Ivan Chau
    Oct 27, 2015 at 16:25
  • Ironically, I distinctly remember many years ago that Google was cited for being different in this respect, in that you could search for special characters and other programming symbols, because it was initially built with programmers in mind. The world was smaller back then. Ah, times change... sigh.
    – MrWhite
    Apr 8, 2016 at 21:47
  • Did you try searching with double quotes like "+=". I did get back results for += when I used Double quotes. google.com/search?q="+="
    – Girish
    Apr 26, 2017 at 7:34

6 Answers 6

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
  • Still doesn't work for \\?\ Jun 27, 2023 at 17:09
26

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.


From https://superuser.com/revisions/16367/1

How do you google for "-f>@+?*<.-&'_:$#/%!"

I came across this arcane bit of Perl:

-f>@+?*<.-&'_:$#/%!

Bonus points for explaining what it does.

The question is, how can you search Google for this string?


Answer

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
  • 3
    @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
4

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

1
  • This doesn't answer the question (the question is about Google). If you are recommending to use duckduckgo.com instead of Google you should elaborate on the reasons. Remember that answers should self contained. Ref. How to Answer. Oct 16, 2023 at 1:02
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
-3

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.

0

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