Questions:
How do you search for non-alphanumeric characters when using Google?
Why doesn't Google always interpret strings enclosed within double-quotes literally?
What is Google's escape character e.g. how would I search for something that contains a double-quote?
Backgound:
I am currently learning Grails. I was reading Mastering Grails: Grails services and Google Maps (which is very good tutorial series BTW) when I came across the following line of code:
def result = [:]
By looking at the surrounding code it seems like result
is defined to be some kind of map, but I wanted more information on what precisely "=[:]
" does.
How do you Google something like this?
I tried searching for:
grails "[:]"
but this returns the same result set as searching for "grails
".
That happens because searching just for:
"[:]"
does not return any results.
Thanks for your time!
[:] is an empty map in Groovy
You can learn more about maps and collections here or focus on Groovy maps.
I think you are assuming that Google is going to do a simple 'grep' where their infrastructure is more setup to search based on a linguistic model.
You might try Google Codesearch
I would encourage you to pull up the Groovy Console (groovyConsole
on the command-line if you have groovy setup) and play around with maps and lists to get the hang of it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With