code: function replace(subject, pattern, replacement, options = []) {
    const opt_global = proplists.get_value(Symbol.for('global'), options);
  
    let regex;
    if (opt_global !== Symbol.for('undefined')) {
      regex = new RegExp(pattern, 'g');
    } else {
      regex = new RegExp(pattern, '');
    }
  
    return subject.replace(regex, replacement);
  }
docs: TODO: Support more options TODO: pattern cannot be list of strings