Example #1
0
function generateConsonantRegex($consonants, $appendRegex)
{
    $result = '';
    for ($i = 0; $i < strlen($consonants); $i++) {
        $result = $result . '[' . getRelatedConsonants($consonants[$i]) . ']' . $appendRegex;
    }
    return $result;
}
Example #2
0
function generateConsonantRegex($consonants, $repeatNumberRegex)
{
    $result = '';
    for ($i = 0; $i < strlen($consonants); $i++) {
        $result = $result . '[' . getRelatedConsonants($consonants($i)) . ']' . $repeatNumberRegex;
    }
    return $result;
}