1--TEST-- 2php-dev@php.gr.jp #884 (2) 3--SKIPIF-- 4<?php 5extension_loaded('mbstring') or die('skip mbstring not available'); 6function_exists('mb_ereg_replace') or die("skip mb_ereg_replace() is not available in this build"); 7?> 8--FILE-- 9<?php 10var_dump(mb_ereg_replace("C?$", "Z", "ABC")); 11var_dump(preg_replace("/C?$/", "Z", "ABC")); 12var_dump(mb_ereg_replace("C*$", "Z", "ABC")); 13var_dump(preg_replace("/C*$/", "Z", "ABC")); 14?> 15--EXPECTF-- 16string(4) "ABZZ" 17string(4) "ABZZ" 18string(4) "ABZZ" 19string(4) "ABZZ" 20