Parsing the URL into parts
Problem
Given a string representing a URL. Parts of the URL are separated by
/
or
//
.
You need to parse the URL string into parts and print each part on a new line.
Input
The first line is the URL. There are no extra spaces at the beginning and at the end of the string.
Imprint
You must print each part of the URL on a new line.
Examples
# |
Input |
Output |
1 |
C:/Photo/2013/Pokhod/vasya.jpg |
C:
2013
Pokhod
vasya.jpg |
2 |
http://chelyabinsk.74.ru/text/newsline/258041618673664.html |
http:
chelyabinsk.74.ru
text
newsline
258041618673664.html |