protected function replaceQuantifierByKey($key, $replacement = '')
	{
		$subject = $this->pattern[$key];

		if (strripos($subject, ')') !== false)
		{
			$subject             = rtrim($subject, ')');
			$subject             = $this->removeQuantifier($subject);
			$this->pattern[$key] = sprintf('%s%s)', $subject, $replacement);
		}
		else
		{
			$subject             = $this->removeQuantifier($subject);
			$this->pattern[$key] = sprintf('%s%s', $subject, $replacement);
		}

		return $this;
	}
protected function replaceQuantifierByKey($key, $replacement = '')
	{
		$subject = $this->pattern[$key];

		if (strripos($subject, ')') !== false)
		{
			$subject             = rtrim($subject, ')');
			$subject             = $this->removeQuantifier($subject);
			$this->pattern[$key] = sprintf('%s%s)', $subject, $replacement);
		}
		else
		{
			$subject             = $this->removeQuantifier($subject);
			$this->pattern[$key] = sprintf('%s%s', $subject, $replacement);
		}

		return $this;
	}
protected function replaceQuantifierByKey ( $ key , $ replacement = '' ) { $ subject = $ this -> pattern [ $ key ] ; if ( strripos ( $ subject , ')' ) !== false ) { $ subject = rtrim ( $ subject , ')' ) ; $ subject = $ this -> removeQuantifier ( $ subject ) ; $ this -> pattern [ $ key ] = sprintf ( '%s%s)' , $ subject , $ replacement ) ; } else { $ subject = $ this -> removeQuantifier ( $ subject ) ; $ this -> pattern [ $ key ] = sprintf ( '%s%s' , $ subject , $ replacement ) ; } return $ this ; }
Allows us to add quantifiers to the pattern created by the last method call

@param string $key The key of the last segment in the pattern array
@param string $replacement The quantifier to add to the previous pattern

@return $this
Allows us to add quantifiers to the pattern created by the last method call