I disagree **strongly** with limiting the ability to paste Google links into
 comments in any way. 
There is a category of brain-dead, exceedingly trivial questions, that can be answered by a link to the proper, authoritative page in the respective manual ("How do I replace a string in PHP?"). In those cases - and only those! - informing the OP of the existence of search engines is perfectly okay in my eyes.

Sometimes, it is right to comment "Just Google it" and "RTFM". Not always, mind, and it's always good to err on the lenient side. But sometimes, it really is.

*Answers* consisting of just a Google link or a mere RTFM are not okay, for the reasons you state. But as @dmckee points out,  those are usually downvoted into the ground anyway.