src/Behat/Behat/Definition/Pattern/Policy/TurnipPatternPolicy.php
private function replaceTurnipAlternativeWordsWithRegex($regex)
    {
        $regex = preg_replace(self::ALTERNATIVE_WORD_REGEXP, '(?:\1|\2)', $regex);
        $regex = $this->removeEscapingOfAlternationSyntax($regex);

        return $regex;
    }
private function replaceTurnipAlternativeWordsWithRegex($regex)
    {
        $regex = preg_replace(self::ALTERNATIVE_WORD_REGEXP, '(?:\1|\2)', $regex);
        $regex = $this->removeEscapingOfAlternationSyntax($regex);

        return $regex;
    }
private function replaceTurnipAlternativeWordsWithRegex ( $ regex ) { $ regex = preg_replace ( self :: ALTERNATIVE_WORD_REGEXP , '(?:\1|\2)' , $ regex ) ; $ regex = $ this -> removeEscapingOfAlternationSyntax ( $ regex ) ; return $ regex ; }
Replaces turnip alternative words with regex non-capturing alternating group.

@param string $regex

@return string
Replaces turnip alternative words with regex non - capturing alternating group .