Beispiel #1
0
function do_tests($enc)
{
    test_ereg($enc, 'abc ([a-z]+) ([a-z]+) ([a-z]+)$', "abc def ghi jkl");
    $pat = '([a-z]+) ([ あ-か]+)([か-な]+) ([わ-ん]+)$';
    test_ereg($enc, $pat, 'abc あおい かこな わゑん');
    test_ereg($enc, $pat, 'mzxfp うおか きか をゐ');
}
Beispiel #2
0
    VS($ret[1], "30");
    VS($ret[2], "1973");
}
function test_spliti()
{
    $str = "aBBBaCCCADDDaEEEaGGGA";
    $chunks = spliti("a", $str, 5);
    VS($chunks[0], "");
    VS($chunks[1], "BBB");
    VS($chunks[2], "CCC");
    VS($chunks[3], "DDD");
    VS($chunks[4], "EEEaGGGA");
}
function test_sql_regcase()
{
    VS(sql_regcase("Foo - bar."), "[Ff][Oo][Oo] - [Bb][Aa][Rr].");
}
test_preg_grep();
test_preg_match();
test_preg_match_all();
test_preg_replace();
test_preg_replace_callback();
test_preg_split();
test_preg_quote();
test_ereg_replace();
test_eregi_replace();
test_ereg();
test_eregi();
test_split();
test_spliti();
test_sql_regcase();