protected function parseRegexp($regexp)
	{
		$this->captures = [['name' => null, 'expr' => null]];
		$regexpInfo = $this->getRegexpInfo($regexp);
		$this->delimiter = $regexpInfo['delimiter'];
		$this->modifiers = str_replace('D', '', $regexpInfo['modifiers']);
		foreach ($regexpInfo['tokens'] as $token)
		{
			if ($token['type'] !== 'capturingSubpatternStart')
			{
				continue;
			}
			$this->captures[] = [
				'pos'    => $token['pos'],
				'name'   => (isset($token['name'])) ? $token['name'] : null,
				'expr'   => $token['content']
			];
		}
	}
protected function parseRegexp($regexp)
	{
		$this->captures = [['name' => null, 'expr' => null]];
		$regexpInfo = $this->getRegexpInfo($regexp);
		$this->delimiter = $regexpInfo['delimiter'];
		$this->modifiers = str_replace('D', '', $regexpInfo['modifiers']);
		foreach ($regexpInfo['tokens'] as $token)
		{
			if ($token['type'] !== 'capturingSubpatternStart')
			{
				continue;
			}
			$this->captures[] = [
				'pos'    => $token['pos'],
				'name'   => (isset($token['name'])) ? $token['name'] : null,
				'expr'   => $token['content']
			];
		}
	}
protected function parseRegexp ( $ regexp ) { $ this -> captures = [ [ 'name' => null , 'expr' => null ] ] ; $ regexpInfo = $ this -> getRegexpInfo ( $ regexp ) ; $ this -> delimiter = $ regexpInfo [ 'delimiter' ] ; $ this -> modifiers = str_replace ( 'D' , '' , $ regexpInfo [ 'modifiers' ] ) ; foreach ( $ regexpInfo [ 'tokens' ] as $ token ) { if ( $ token [ 'type' ] !== 'capturingSubpatternStart' ) { continue ; } $ this -> captures [ ] = [ 'pos' => $ token [ 'pos' ] , 'name' => ( isset ( $ token [ 'name' ] ) ) ? $ token [ 'name' ] : null , 'expr' => $ token [ 'content' ] ] ; } }
Parse given regexp and store its information

@param  string  $regexp
@return void
Parse given regexp and store its information