Grep is a tool for matching text. You need something else if you want to transform text. If you have the values in question in a bash variable, then what you ask is pretty easy:
authority=blabla.com
# Here's the important bit:
domain=${authority/*./}
echo $domain
The funny syntax in the middle evaluates to the result of a pattern substitution on the value of variable temp.
If you're trying to do this on lines of a file, then the sed program is your friend:
sed 's/.*\.//' < input.file
This is again a pattern substitution, but sed uses regular expression patterns, whereas bash uses shell glob patterns.
grepis an abbreviation for "Globally find a Regular Expression and Print the result". What you are describing is a job for some other tool likesedorawk. If your URLs are included among other text in files, post some samples of that full text. Also post exactly what your expected output would be given your posted sample input.grepis not what I wanted in the end because it only prints .. I thinkawkis more suitable ( I am studying on it ) ! sorry for the late answer