Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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.

share|improve this question
    
Lol, you get 10 results if you include it in quotes, none of them containing the string ;-). –  Gamecat Jul 31 '09 at 14:02
1  
I get the error "$# is no longer supported" on Perl 5.10 –  Brad Gilbert Jul 31 '09 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 '09 at 14:07
13  
I think you forgot to post the code and just mashed your keyboard. –  Salgar Jul 31 '09 at 14:16
    
I am claiming the bonus points. See below. –  Sinan Ünür Jul 31 '09 at 15:11

11 Answers 11

up vote 24 down vote accepted

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:

share|improve this answer
    
Note that Google Code Search is no longer available as of today, alas. groups.google.com/group/google-code-search/browse_thread/thread/… –  Alex Dupuy Jan 15 '12 at 7:50

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.

share|improve this answer
    
This seems to get plenty of results: google.com/search?q="a+star"+search+algorithm –  Jon Skeet Jul 31 '09 at 14:07
4  
Makes me miss AltaVista –  Eli Jul 31 '09 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 '09 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 '09 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 '09 at 20:12

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

share|improve this 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.

share|improve this answer
    
Wow, bravo. I missed $# (deprecated?) and -&'_. –  Mark Canlas Jul 31 '09 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. –  Sinan Ünür Jul 31 '09 at 15:19

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!"

share|improve this answer

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).

share|improve this answer
    
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 '11 at 7:22

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 ].
share|improve this answer

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

share|improve this answer
1  
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 '11 at 7:31

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

share|improve this answer

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.

share|improve this answer

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 below for more information.

http://php.net/manual/en/language.operators.assignment.php

share|improve this answer

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.