replaceBetween 
Replaces text within a range starting and ending with a specific character in a given string with another string. For example, given the string abc<DEF>ghi, to change <DEF> to def, use replaceBetween('abc<DEF>ghi', '<', '>', 'def'). The result would be abcdefghi.
Deletes strings in the range if replaceWith is not specified.
Parameters
str::stringstartChar::stringendChar::stringreplaceWith::string || ''
Returns
string
Examples
javascript
replaceBetween('ab[c]d[e]f', '[', ']'); // Returns 'abdf'
replaceBetween('abcd:replace:', ':', ':', 'e'); // Returns 'abcde'dart
replaceBetween('ab[c]d[e]f', '[', ']'); // Returns 'abdf'
replaceBetween('abcd:replace:', ':', ':', 'e'); // Returns 'abcde'