Question: I have an ASCII-art box and I need a program to open it.

Examples
--------

Input:

```
-------
|     |
|_____|

```

Output:

```
      /
     /
    /
   /
  /
 /
/
|     |
|_____|

```

Specification
=============

* The first line will only consist of `-`, at least 3 of them
* The middle rows will start with `|` have spaces, and end with `|`
	+ All the middle rows will be the same
* The last row will start with `|` have `_` and end with a `|`
* All rows will be the same length

Opening the box:

* Each `-` should be replaced by a `/` in ascending lines and position.

Answer: 
JavaScript ES6, 57 bytes
------------------------

```
s=>s[r="replace"](/-+/,s=>s[r](/-/g,`
$'/`))[r](/-/g,' ')

```

Outputs a leading newline. Works by taking the row of `-`s and converting them into a triangle, then replacing the `-`s with spaces.

Edit: Saved 5 bytes thanks to @edc65.
Python, 125 bytes (110 without box)
===================================

```
i="\n---\n| |\n|_|"
l,b,r=i.count("-"),i.split('\n'),range
for x in r(1,l):print" "*(l-x)+"/"
for x in r(2,len(b)):print b[x]

```

If anyone has any idea how to shorten it, please let me know!