public function add($char, $expr)
	{
		$split = $this->input->split($char);
		if (count($split) !== 1)
		{
			throw new InvalidArgumentException('Meta-characters must be represented by exactly one character');
		}
		if (@preg_match('(' . $expr . ')u', '') === false)
		{
			throw new InvalidArgumentException("Invalid expression '" . $expr . "'");
		}

		$inputValue = $split[0];
		$metaValue  = $this->computeValue($expr);

		$this->exprs[$metaValue] = $expr;
		$this->meta[$inputValue] = $metaValue;
	}
public function add($char, $expr)
	{
		$split = $this->input->split($char);
		if (count($split) !== 1)
		{
			throw new InvalidArgumentException('Meta-characters must be represented by exactly one character');
		}
		if (@preg_match('(' . $expr . ')u', '') === false)
		{
			throw new InvalidArgumentException("Invalid expression '" . $expr . "'");
		}

		$inputValue = $split[0];
		$metaValue  = $this->computeValue($expr);

		$this->exprs[$metaValue] = $expr;
		$this->meta[$inputValue] = $metaValue;
	}
public function add ( $ char , $ expr ) { $ split = $ this -> input -> split ( $ char ) ; if ( count ( $ split ) !== 1 ) { throw new InvalidArgumentException ( 'Meta-characters must be represented by exactly one character' ) ; } if ( @ preg_match ( '(' . $ expr . ')u' , '' ) === false ) { throw new InvalidArgumentException ( "Invalid expression '" . $ expr . "'" ) ; } $ inputValue = $ split [ 0 ] ; $ metaValue = $ this -> computeValue ( $ expr ) ; $ this -> exprs [ $ metaValue ] = $ expr ; $ this -> meta [ $ inputValue ] = $ metaValue ; }
Add a meta-character to the list

@param  string $char Meta-character
@param  string $expr Regular expression
@return void
Add a meta - character to the list