qsu
Version:
qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.
1 lines • 184 B
JavaScript
export function replaceBetween(e,t,n,r=""){if(!e)return"";const $=/[.*+?^${}()|[\]\\]/g,c=$.test(t)?`\\${t}`:t,p=$.test(n)?`\\${n}`:n;return e.replace(new RegExp(`${c}.*?${p}`,"g"),r)}