protected function parseAttributeValue()
	{
		// Test whether the value is in quotes
		if ($this->text[$this->pos] === '"' || $this->text[$this->pos] === "'")
		{
			return $this->parseQuotedAttributeValue();
		}

		// Capture everything up to whichever comes first:
		//  - an endline
		//  - whitespace followed by a slash and a closing bracket
		//  - a closing bracket, optionally preceded by whitespace
		//  - whitespace followed by another attribute (name followed by equal sign)
		//
		// NOTE: this is for compatibility with some forums (such as vBulletin it seems)
		//       that do not put attribute values in quotes, e.g.
		//       [quote=John Smith;123456] (quoting "John Smith" from post #123456)
		if (!preg_match('#[^\\]\\n]*?(?=\\s*(?:\\s/)?\\]|\\s+[-\\w]+=)#', $this->text, $m, null, $this->pos))
		{
			throw new RuntimeException;
		}

		$attrValue  = $m[0];
		$this->pos += strlen($attrValue);

		return $attrValue;
	}
protected function parseAttributeValue()
	{
		// Test whether the value is in quotes
		if ($this->text[$this->pos] === '"' || $this->text[$this->pos] === "'")
		{
			return $this->parseQuotedAttributeValue();
		}

		// Capture everything up to whichever comes first:
		//  - an endline
		//  - whitespace followed by a slash and a closing bracket
		//  - a closing bracket, optionally preceded by whitespace
		//  - whitespace followed by another attribute (name followed by equal sign)
		//
		// NOTE: this is for compatibility with some forums (such as vBulletin it seems)
		//       that do not put attribute values in quotes, e.g.
		//       [quote=John Smith;123456] (quoting "John Smith" from post #123456)
		if (!preg_match('#[^\\]\\n]*?(?=\\s*(?:\\s/)?\\]|\\s+[-\\w]+=)#', $this->text, $m, null, $this->pos))
		{
			throw new RuntimeException;
		}

		$attrValue  = $m[0];
		$this->pos += strlen($attrValue);

		return $attrValue;
	}
protected function parseAttributeValue ( ) { // Test whether the value is in quotes if ( $ this -> text [ $ this -> pos ] === '"' || $ this -> text [ $ this -> pos ] === "'" ) { return $ this -> parseQuotedAttributeValue ( ) ; } // Capture everything up to whichever comes first: //  - an endline //  - whitespace followed by a slash and a closing bracket //  - a closing bracket, optionally preceded by whitespace //  - whitespace followed by another attribute (name followed by equal sign) // // NOTE: this is for compatibility with some forums (such as vBulletin it seems) //       that do not put attribute values in quotes, e.g. //       [quote=John Smith;123456] (quoting "John Smith" from post #123456) if ( ! preg_match ( '#[^\\]\\n]*?(?=\\s*(?:\\s/)?\\]|\\s+[-\\w]+=)#' , $ this -> text , $ m , null , $ this -> pos ) ) { throw new RuntimeException ; } $ attrValue = $ m [ 0 ] ; $ this -> pos += strlen ( $ attrValue ) ; return $ attrValue ; }
Parse the attribute value starting at current position

@return string
Parse the attribute value starting at current position