function regexMap ($regexp, $replaceWith, $useKeys = false)
  {
    $this->setIterator (
      new RegexIterator ($this->getIterator (), $regexp, RegexIterator::REPLACE, $useKeys ? RegexIterator::USE_KEY : 0)
    );
    $this->it->replacement = $replaceWith;
    return $this;
  }
function regexMap ($regexp, $replaceWith, $useKeys = false)
  {
    $this->setIterator (
      new RegexIterator ($this->getIterator (), $regexp, RegexIterator::REPLACE, $useKeys ? RegexIterator::USE_KEY : 0)
    );
    $this->it->replacement = $replaceWith;
    return $this;
  }
function regexMap ( $ regexp , $ replaceWith , $ useKeys = false ) { $ this -> setIterator ( new RegexIterator ( $ this -> getIterator ( ) , $ regexp , RegexIterator :: REPLACE , $ useKeys ? RegexIterator :: USE_KEY : 0 ) ) ; $ this -> it -> replacement = $ replaceWith ; return $ this ; }
Transforms each string data item into another using a regular expression.

@param string $regexp      The regular expression to match.
@param string $replaceWith Literal content with $N placeholders, where N is the capture group index.
@param bool   $useKeys     When `true`, the iterated keys will be used instead of the corresponding values.
@return $this
Transforms each string data item into another using a regular expression .