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 (Node.js)](https://nodejs.org), 56 bytes
====================================================

```javascript
a=>a[b="replace"](/-+/,c=>c[b](d=/-/g,`
$'/`))[b](d,' ')

```

[Try it online!](https://tio.run/##JctBCoMwEEDRfU4RpJCEJs4JxouINOMYpSUYiaWr3D1qfcsP/0M/2jm/t69b0xTqjJWwo37EJoctEodm0OCeYBk77sdBTwgOFuvFQ4E35p@skspUTuueYmhjWvSsvbuJIi9FlNelnE89AA "JavaScript (Node.js) – Try It Online")

Should be written as a comment of **@Neil**'s [answer](https://codegolf.stackexchange.com/a/70655/82328) but I can't create comments yet
[K (ngn/k)](https://github.com/ngn/k), 18 bytes
===============================================

```
{(" /"@|=#*x),1_x}

```

[Try it online!](https://tio.run/##y9bNS8/7/z/NqlpDSUFfyaHGVlmrQlPHML6i9n@ahpIuBChxKSgo1SiAQA2EHQ8CNUqa/wE "K (ngn/k) – Try It Online")