## CJam, 32 bytes ri_"/\\"*\" /"*{_1>}h;;]_z..e>N* [Test it here.][1] I was trying to help Reto golf his CJam answer but ended up with a solution that had nothing to do with his, so I figured I might as well post it myself. Will add an explanation later. [1]: http://cjam.aditsu.net/#code=ri_%22%2F%5C%5C%22*%5C%22%20%2F%22*%7B_1%3E%7Dh%3B%3B%5D_z..e%3EN*&input=4