I have a string between characters like this:

```
new/set/25/
type/22/set/3/
aa/23/mine/set/9/yous
set/34
/dol/22/mmm/sss/set/23

```

it has a value pattern like this:

```
set/{n}

```

i tried to replace the `{n}` value using this function:

```
var pathname = 'new/set/9/'   
pathName = pathName.replace(/(/\//gset/\//g)([0-9]+)/, '$1' + '5';
//expected result = new/set/5/

```

but it is not working