protected function buildCharsMatch($specialChars)
    {
        $specialCharsArray = str_split($specialChars);

        $specialCharsMatch = implode('|', array_map(function ($char) {
            return $char.'+';
        }, $specialCharsArray));

        return $specialCharsMatch;
    }
protected function buildCharsMatch($specialChars)
    {
        $specialCharsArray = str_split($specialChars);

        $specialCharsMatch = implode('|', array_map(function ($char) {
            return $char.'+';
        }, $specialCharsArray));

        return $specialCharsMatch;
    }
protected function buildCharsMatch ( $ specialChars ) { $ specialCharsArray = str_split ( $ specialChars ) ; $ specialCharsMatch = implode ( '|' , array_map ( function ( $ char ) { return $ char . '+' ; } , $ specialCharsArray ) ) ; return $ specialCharsMatch ; }
Builds a chars match regular expression.

@param string $specialChars A string of chars to build the regular expression

@return string The chars match regular expression
Builds a chars match regular expression .