public function setSource($source)
    {
        $this->source = $source;
        $this->length = mb_strlen($source);
        $this->head = 0;
        $this->last= 0;
        $this->captures = array();
        $this->match = null;
        $this->reset();

        return $this;
    }