src/Behat/Behat/Definition/Pattern/Policy/RegexPatternPolicy.php
private function countPlaceholders($stepText, $stepRegex)
    {
        preg_match('/^' . $stepRegex . '$/', $stepText, $matches);

        return count($matches) ? count($matches) - 1 : 0;
    }
private function countPlaceholders($stepText, $stepRegex)
    {
        preg_match('/^' . $stepRegex . '$/', $stepText, $matches);

        return count($matches) ? count($matches) - 1 : 0;
    }
private function countPlaceholders ( $ stepText , $ stepRegex ) { preg_match ( '/^' . $ stepRegex . '$/' , $ stepText , $ matches ) ; return count ( $ matches ) ? count ( $ matches ) - 1 : 0 ; }
Counts regex placeholders using provided text.

@param string $stepText
@param string $stepRegex

@return integer
Counts regex placeholders using provided text .