src/Behat/Behat/Definition/Pattern/Policy/TurnipPatternPolicy.php
private function replaceTokensWithRegexCaptureGroups($regex)
    {
        $tokenRegex = self::TOKEN_REGEX;

        return preg_replace_callback(
            self::PLACEHOLDER_REGEXP,
            array($this, 'replaceTokenWithRegexCaptureGroup'),
            $regex
        );
    }
private function replaceTokensWithRegexCaptureGroups($regex)
    {
        $tokenRegex = self::TOKEN_REGEX;

        return preg_replace_callback(
            self::PLACEHOLDER_REGEXP,
            array($this, 'replaceTokenWithRegexCaptureGroup'),
            $regex
        );
    }
private function replaceTokensWithRegexCaptureGroups ( $ regex ) { $ tokenRegex = self :: TOKEN_REGEX ; return preg_replace_callback ( self :: PLACEHOLDER_REGEXP , array ( $ this , 'replaceTokenWithRegexCaptureGroup' ) , $ regex ) ; }
Replaces turnip tokens with regex capture groups.

@param string $regex

@return string
Replaces turnip tokens with regex capture groups .