--TEST--
RegReplace test 1
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="abc123";
echo ereg_replace("123","def",$a)?>
--TEST--
RegReplace test 2
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="abc123";
echo ereg_replace("123","",$a)?>
--TEST--
ereg_replace single-quote test
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="\\'test";
echo ereg_replace("\\\\'","'",$a)
--TEST--
simple ereg test
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="This is a nice and simple string";
if (ereg(".*nice and simple.*",$a)) {
--TEST--
Test Regular expression register support in ereg
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="This is a nice and simple string";
echo ereg(".*(is).*(is).*",$a,$registers);
--TEST--
Test ereg_replace of start-of-line
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="This is a nice and simple string";
echo ereg_replace("^This","That",$a);
--TEST--
Test empty result buffer in reg_replace
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php
$a="abcd";
--TEST--
Test back-references in regular expressions
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php
echo ereg_replace("([a-z]*)([-=+|]*)([0-9]+)","\\3 \\1 \\2\n","abc+-|=123");
--TEST--
Test split()
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php
$a=split("[[:space:]]","this is a
--TEST--
Long back references
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="abc122222222223";
echo ereg_replace("1(2*)3","\\1def\\1",$a)?>
--TEST--
\0 back reference
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="abc123";
echo ereg_replace("123","def\\0ghi",$a)?>
--TEST--
nonexisting back reference
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="abc123";
echo ereg_replace("123",'def\1ghi',$a)?>
--TEST--
escapes in replace string
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="abc123";
echo ereg_replace("123","def\\g\\\\hi\\",$a)?>
--TEST--
backreferences not replaced recursively
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php $a="a\\2bxc";
echo ereg_replace("a(.*)b(.*)c","\\1",$a)?>
--TEST--
replace empty matches
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php echo ereg_replace("^","z","abc123")?>
--EXPECT--
--TEST--
test backslash handling in regular expressions
+--SKIPIF--
+<?php if (unicode_semantics()) die('skip unicode.semantics=on'); ?>
--FILE--
<?php echo ereg_replace('\?',"abc","?123?")?>
--EXPECT--