public function fragmentize() {
        $re = implode('|', array(
            self::RE_SHORT_TOKEN_START, self::RE_SHORT_TOKEN_END,
            self::RE_LONG_TOKEN_START, self::RE_LONG_TOKEN_END,
            self::RE_TEXT
        ));

        preg_match_all('/'.$re.'/', $this->text, $matches);
        $this->fragments = $matches[0];
        $this->tokens = array();
    }
public function fragmentize() {
        $re = implode('|', array(
            self::RE_SHORT_TOKEN_START, self::RE_SHORT_TOKEN_END,
            self::RE_LONG_TOKEN_START, self::RE_LONG_TOKEN_END,
            self::RE_TEXT
        ));

        preg_match_all('/'.$re.'/', $this->text, $matches);
        $this->fragments = $matches[0];
        $this->tokens = array();
    }
public function fragmentize ( ) { $ re = implode ( '|' , array ( self :: RE_SHORT_TOKEN_START , self :: RE_SHORT_TOKEN_END , self :: RE_LONG_TOKEN_START , self :: RE_LONG_TOKEN_END , self :: RE_TEXT ) ) ; preg_match_all ( '/' . $ re . '/' , $ this -> text , $ matches ) ; $ this -> fragments = $ matches [ 0 ] ; $ this -> tokens = array ( ) ; }
Splits texts into fragments, where some fragments are tokens, others are text
Splits texts into fragments where some fragments are tokens others are text