Given a valid
goo.gl shortened link, output the original URL.
goo.gl/qIwi3N would give something like
https://codegolf.stackexchange.com/. For input, you can choose to have the
https?:// at the beginning, you can choose to have
www. before the
goo.gl, and you can also choose to get rid of the
goo.gl if you only want the end of the URL. A slash at the end is optional for input and output. So, your input will end up matching the regex
(https?://)?(www\.)?(goo\.gl/)?[A-Za-z0-9]+/?. For the output, you can choose whether or not to output
https?://, whether or not to output
www., and whether or not to output a trailing slash. However, you must be consistent with your I/O formatting.
I will say that you do not have to be consistent with
http for output (but you must be consistent for input), as long as you are consistent with whether or not you include the whole
These are written with no
www., no trailing slash in the input; yes
www., and yes trailing slash in the output.
input -> output goo.gl/HaE8Au -> https://codegolf.stackexchange.com/ goo.gl/IfZMwe -> https://stackoverflow.com/ goo.gl/JUdmxL -> https://chat.stackexchange.com/rooms/240/the-nineteenth-byte
- You may assume that the shortened link will not point to another shortened link and that the destination site will return a status code of
You can go here and enter a URL to apply the inverse operation of this: https://goo.gl/