Index: /trunk/phpgwapi/inc/class.xmlrpc_server_php.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xmlrpc_server_php.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.xmlrpc_server_php.inc.php	(revision 5912)
@@ -247,6 +247,6 @@
 			$_type = (is_integer($_res) ? 'int' : gettype($_res));
 
-			if ($_type == 'string' && (ereg('^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$',$_res)
-			                           || ereg('^[0-9]{4}[0-9]{2}[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$',$_res) ) )
+			if ($_type == 'string' && (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/',$_res)
+			                           || preg_match('/^[0-9]{4}[0-9]{2}[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/',$_res) ) )
 			{
 				$_type = 'dateTime.iso8601';
@@ -316,5 +316,5 @@
 				$this->last_method = $methName;
 
-				if (ereg("^system\.", $methName))
+				if (preg_match('/^system\./', $methName))
 				{
 					$dmap = $GLOBALS['_xmlrpcs_dmap'];
@@ -350,5 +350,5 @@
 						$class    = $tmp[0];
 
-						if (ereg('^service',$method))
+						if (preg_match('/^service/',$method))
 						{
 							$t = 'phpgwapi.' . $class . '.exec';
@@ -418,5 +418,5 @@
 								$this->req_array = $GLOBALS['phpgw']->translation->convert($this->req_array,'utf-8');
 								//_debug_array($this->req_array);
-								if (ereg('^service',$method))
+								if (preg_match('/^service/',$method))
 								{
 									$res = ExecMethod('phpgwapi.service.exec',array($service,$methName,$this->req_array));
Index: /trunk/phpgwapi/inc/class.wsdl.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.wsdl.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.wsdl.inc.php	(revision 5912)
@@ -215,5 +215,5 @@
 			}
 			// get element prefix
-			if(ereg(":",$name))
+			if(preg_match('/:/',$name))
 			{
 				$prefix = substr($name,0,strpos($name,':'));
Index: /trunk/phpgwapi/inc/class.soap_parser.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.soap_parser.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.soap_parser.inc.php	(revision 5912)
@@ -143,13 +143,13 @@
 
 			// set status
-			if(ereg(":Envelope$",$name))
+			if(preg_match('/:Envelope$/',$name))
 			{
 				$this->status = 'envelope';
 			}
-			elseif(ereg(":Header$",$name))
+			elseif(preg_match('/:Header$/',$name))
 			{
 				$this->status = 'header';
 			}
-			elseif(ereg(":Body$",$name))
+			elseif(preg_match('/:Body$/',$name))
 			{
 				$this->status = 'body';
@@ -159,5 +159,5 @@
 			{
 				$this->status = 'method';
-				if(ereg(':',$name))
+				if(preg_match('/:/',$name))
 				{
 					$this->root_struct_name = substr(strrchr($name,':'),1);
@@ -178,5 +178,5 @@
 			$this->message[$pos]['attrs'] = $attrs;
 			// get namespace
-			if(ereg(":",$name))
+			if(preg_match('/:/',$name))
 			{
 				$namespace = substr($name,0,strpos($name,':'));
@@ -194,5 +194,5 @@
 			{
 				// if ns declarations, add to class level array of valid namespaces
-				if(ereg('xmlns:',$key))
+				if(preg_match('/xmlns:/',$key))
 				{
 					$namespaces[substr(strrchr($key,':'),1)] = $value;
@@ -289,9 +289,9 @@
 				$this->status = 'body';
 			}
-			elseif(ereg(':Body',$name))
+			elseif(preg_match('/:Body/',$name))
 			{
 				$this->status = 'header';
 	 		}
-			elseif(ereg(':Header',$name))
+			elseif(preg_match('/:Header/',$name))
 			{
 				$this->status = 'envelope';
Index: /trunk/phpgwapi/inc/class.vfs_shared.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vfs_shared.inc.php	(revision 5164)
+++ /trunk/phpgwapi/inc/class.vfs_shared.inc.php	(revision 5912)
@@ -795,5 +795,5 @@
 			for($i=0;$i<sizeof($contents);$i++)
 			{
-				if (!ereg("^#",$contents[$i]))
+				if (!preg_match('/^#/',$contents[$i]))
 				{
 					$line=split("[[:space:]]+", $contents[$i]);
Index: /trunk/phpgwapi/inc/class.clientsniffer.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.clientsniffer.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.clientsniffer.inc.php	(revision 5912)
@@ -237,10 +237,10 @@
 				$this->OS = 'hpux';
 			}
-			if(eregi('hp-ux',$this->UA) && ereg('10.',$this-UA))  
+			if(eregi('hp-ux',$this->UA) && preg_match('/10./',$this-UA))  
 			{
 				$this->PLATFORM = 'Unix';
 				$this->OS = 'hpux10';
 			}
-			elseif(eregi('hp-ux',$this->UA) && ereg('09.',$this-UA))  
+			elseif(eregi('hp-ux',$this->UA) && preg_match('/09./',$this-UA))  
 			{
 				$this->PLATFORM = 'Unix';
Index: /trunk/phpgwapi/inc/class.soap_client.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.soap_client.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.soap_client.inc.php	(revision 5912)
@@ -53,10 +53,10 @@
 
 			// endpoint mangling
-			if(ereg("^http://",$path))
+			if(preg_match('/^http:\/\//',$path))
 			{
 				$path = str_replace('http://','',$path);
 				$this->path = strstr($path,'/');
 				$this->debug("path = $this->path");
-				if(ereg(':',$path))
+				if(preg_match('/:/',$path))
 				{
 					$this->server = substr($path,0,strpos($path,':'));
Index: /trunk/phpgwapi/inc/class.graphics.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.graphics.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.graphics.inc.php	(revision 5912)
@@ -87,5 +87,5 @@
 				while( list($key, $val) = each($HTTP_POST_VARS)) 
 				{
-					if (ereg("(.*)_x",$key,$varName) && $HTTP_POST_VARS[$varName[1]."_y"])
+					if (preg_match('/(.*)_x/',$key,$varName) && $HTTP_POST_VARS[$varName[1]."_y"])
 					{
 						$name = $varName[1];
Index: /trunk/phpgwapi/inc/class.soapval.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.soapval.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.soapval.inc.php	(revision 5912)
@@ -54,5 +54,5 @@
 				if(is_array($value) && count($value) >= 1)
 				{
-					if(ereg("[a-zA-Z0-9\-]*",key($v)))
+					if(preg_match('/[a-zA-Z0-9\-]*/',key($v)))
 					{
 						$type = 'struct';
@@ -104,5 +104,5 @@
 
 			// get type prefix
-			if(ereg(":",$type))
+			if(preg_match('/:/',$type))
 			{
 				$this->type = substr(strrchr($type,':'),1,strlen(strrchr($type,':')));
@@ -199,5 +199,5 @@
 						if(is_array($v))
 						{
-							if(ereg("[a-zA-Z\-]*",key($v)))
+							if(preg_match('/[a-zA-Z\-]*/',key($v)))
 							{
 								$type = 'struct';
@@ -208,5 +208,5 @@
 							}
 						}
-						elseif(!ereg("^[0-9]*$",$k) && in_array($k,array_keys($this->soapTypes)))
+						elseif(!preg_match('/^[0-9]*$/',$k) && in_array($k,array_keys($this->soapTypes)))
 						{
 							$type = $k;
Index: /trunk/phpgwapi/inc/class.http_dav_client.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.http_dav_client.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.http_dav_client.inc.php	(revision 5912)
@@ -151,5 +151,5 @@
 			foreach ($attr as $name => $value)
 			{
-				if (ereg('^XMLNS:(.*)', $name, $matches) )
+				if (preg_match('/^XMLNS:(.*)/', $name, $matches) )
 				{
 					$this->namespaces[$matches[1]] = $value;
Index: /trunk/phpgwapi/inc/class.soapmsg.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.soapmsg.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.soapmsg.inc.php	(revision 5912)
@@ -122,5 +122,5 @@
 			// strip headers here
 			//$clean_data = ereg_replace("\r\n","\n", $data);
-			if(ereg("^.*\r\n\r\n<",$data))
+			if(preg_match('/^.*\r\n\r\n</',$data))
 			{
 				$this->debug("found proper seperation of headers and document");
@@ -144,5 +144,5 @@
 	/*
 			// if response is a proper http response, and is not a 200
-			if(ereg("^HTTP",$clean_data) && !ereg("200$", $clean_data))
+			if(preg_match('/^HTTP/',$clean_data) && !ereg("200$", $clean_data))
 			{
 				// get error data
Index: /trunk/phpgwapi/inc/class.sbox.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sbox.inc.php	(revision 588)
+++ /trunk/phpgwapi/inc/class.sbox.inc.php	(revision 5912)
@@ -276,5 +276,5 @@
 			);
 
-			if (ereg(",", $selected))
+			if (preg_match('/,/', $selected))
 			{
 				$selected = "group";
@@ -313,5 +313,5 @@
 					}
 				}
-				elseif (ereg("," . $group['account_id'] . ",", $selected))
+				elseif (preg_match('/,/' . $group['account_id'] . ",", $selected))
 				{
 					$out .= " SELECTED";
Index: /trunk/phpgwapi/inc/class.xmlrpcmsg.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xmlrpcmsg.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.xmlrpcmsg.inc.php	(revision 5912)
@@ -157,5 +157,5 @@
 			// see if we got an HTTP 200 OK, else bomb
 			// but only do this if we're using the HTTP protocol.
-			if (ereg("^HTTP",$data) && !ereg("^HTTP/[0-9.]+ 200 ", $data))
+			if (preg_match('/^HTTP/',$data) && !preg_match('/^HTTP/[0-9.]+ 200 /', $data))
 			{
 				$errstr = substr($data, 0, strpos($data, "\n")-1);
@@ -169,5 +169,5 @@
 			// if using HTTP, then gotta get rid of HTTP headers here
 			// and we store them in the 'ha' bit of our data array
-			if (ereg("^HTTP", $data))
+			if (preg_match('/^HTTP/', $data))
 			{
 				$ar=explode("\r\n", $data);
Index: /trunk/phpgwapi/inc/class.http.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.http.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.http.inc.php	(revision 5912)
@@ -459,5 +459,5 @@
 									break;
 								case 'expires':
-									if(ereg("^((Mon|Monday|Tue|Tuesday|Wed|Wednesday|Thu|Thursday|Fri|Friday|Sat|Saturday|Sun|Sunday), )?([0-9]{2})\\-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\-([0-9]{2,4}) ([0-9]{2})\\:([0-9]{2})\\:([0-9]{2}) GMT$",$value,$matches))
+									if(preg_match('/^((Mon|Monday|Tue|Tuesday|Wed|Wednesday|Thu|Thursday|Fri|Friday|Sat|Saturday|Sun|Sunday), )?([0-9]{2})\\-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\-([0-9]{2,4}) ([0-9]{2})\\:([0-9]{2})\\:([0-9]{2}) GMT$/',$value,$matches))
 									{
 										$year = (int)$matches[5];
Index: /trunk/phpgwapi/inc/xml_functions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/xml_functions.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/xml_functions.inc.php	(revision 5912)
@@ -151,5 +151,5 @@
 		while($i<sizeof($top))
 		{
-			if (ereg("^([#a-zA-Z0-9]+);", $top[$i], $regs))
+			if (preg_match('/^([#a-zA-Z0-9]+);/', $top[$i], $regs))
 			{
 				$op .= ereg_replace("^[#a-zA-Z0-9]+;",
@@ -178,5 +178,5 @@
 			return $GLOBALS['xmlEntities'][strtolower($ent)];
 		}
-		if (ereg("^#([0-9]+)$", $ent, $regs))
+		if (preg_match('/^#([0-9]+)$/', $ent, $regs))
 		{
 			return chr($regs[1]);
@@ -313,5 +313,5 @@
 					// we have an I4, INT or a DOUBLE
 					// we must check that only 0123456789-.<space> are characters here
-					if (!ereg("^\-?[0123456789 \t\.]+$", $GLOBALS['_xh'][$parser]['ac']))
+					if (!preg_match('/^\-?[0123456789 \t\.]+$/', $GLOBALS['_xh'][$parser]['ac']))
 					{
 						// TODO: find a better way of throwing an error
@@ -387,5 +387,5 @@
 	function xmlrpc_cd($parser, $data)
 	{
-		//if (ereg("^[\n\r \t]+$", $data)) return;
+		//if (preg_match('/^[\n\r \t]+$/', $data)) return;
 		// print "adding [${data}]\n";
 
@@ -460,5 +460,5 @@
 		// return a timet in the localtime, or UTC
 		$t=0;
-		if (ereg("([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})",$idate, $regs))
+		if (preg_match('/([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/',$idate, $regs))
 		{
 			if ($utc)
@@ -590,5 +590,5 @@
 		$methName = $m->getParam(0);
 		$methName = $methName->scalarval();
-		if (ereg("^system\.", $methName))
+		if (preg_match('/^system\./', $methName))
 		{
 			$dmap = $GLOBALS['_xmlrpcs_dmap'];
@@ -637,5 +637,5 @@
 		$methName = $m->getParam(0);
 		$methName = $methName->scalarval();
-		if (ereg("^system\.", $methName))
+		if (preg_match('/^system\./', $methName))
 		{
 			$dmap = $GLOBALS['_xmlrpcs_dmap'];
Index: /trunk/phpgwapi/inc/class.soap_server.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.soap_server.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.soap_server.inc.php	(revision 5912)
@@ -92,9 +92,9 @@
 			{
 				$action = str_replace('"','',$headers_array["SOAPAction"]);
-				if(ereg("^urn:",$action))
+				if(preg_match('/^urn:/',$action))
 				{
 					$this->service = substr($action,4);
 				}
-				elseif(ereg(".php",$action))
+				elseif(preg_match('/.php/',$action))
 				{
 					$this->service = ereg_replace('"|/','',substr(strrchr($action,".php"),4,strlen(strrchr($action,"/"))));
@@ -126,5 +126,5 @@
 				/* egroupware customization - createobject based on methodname */
 				list($app,$class,$method) = explode('.',$this->methodname);
-				if(ereg("^service",$app))
+				if(preg_match('/^service/',$app))
 				{
 					$args  = $class;
Index: /trunk/phpgwapi/inc/class.xmlrpc_server_epi.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xmlrpc_server_epi.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.xmlrpc_server_epi.inc.php	(revision 5912)
@@ -163,5 +163,5 @@
 
 			/* Setup dispatch map based on the function, if this is a system call */
-			if(ereg('^system\.', $methName))
+			if(preg_match('/^system\./', $methName))
 			{
 				foreach($GLOBALS['_xmlrpcs_dmap'] as $meth => $dat)
@@ -172,7 +172,7 @@
 				$dmap = $this->dmap;
 			}
-			elseif(ereg('^examples\.',$methName) ||
-				ereg('^validator1\.',$methName) ||
-				ereg('^interopEchoTests\.', $methName)
+			elseif(preg_match('/^examples\./',$methName) ||
+				preg_match('/^validator1\./',$methName) ||
+				preg_match('/^interopEchoTests\./', $methName)
 			)
 			{
Index: /trunk/phpgwapi/inc/class.network.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.network.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.network.inc.php	(revision 5912)
@@ -164,5 +164,5 @@
 			}
 			$response = $this->read_port();
-			if(!ereg(strtoupper($expected_response),strtoupper($response)))
+			if(!preg_match('/'.strtoupper($expected_response).'/',strtoupper($response)))
 			{
 				if(substr($expected_response,1,1) == '+')
Index: /trunk/phpgwapi/inc/class.common.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.common.inc.php	(revision 5141)
+++ /trunk/phpgwapi/inc/class.common.inc.php	(revision 5912)
@@ -58,6 +58,6 @@
 		function cmp_version($str1,$str2,$debug=False)
 		{
-			ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str1,$regs);
-			ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str2,$regs2);
+			preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)/',$str1,$regs);
+			preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)/',$str2,$regs2);
 			if($debug) { echo "<br>$regs[0] - $regs2[0]"; }
 
@@ -89,6 +89,6 @@
 		function cmp_version_long($str1,$str2,$debug=False)
 		{
-			ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str1,$regs);
-			ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str2,$regs2);
+			preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)/',$str1,$regs);
+			preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)/',$str2,$regs2);
 			if($debug) { echo "<br>$regs[0] - $regs2[0]"; }
 
@@ -456,5 +456,5 @@
 			/*
 			$s = '<a href="' . $GLOBALS['phpgw']->link($link,$extravars) . '"> ' . lang($label) . ' </a>';
-			if (ereg('^[0-9]+$',$record))
+			if (preg_match('/^[0-9]+$/',$record))
 			{
 				if ($record != $GLOBALS['phpgw_info']['user']['account_id'])
Index: /trunk/phpgwapi/inc/class.vfs_dav.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.vfs_dav.inc.php	(revision 3863)
+++ /trunk/phpgwapi/inc/class.vfs_dav.inc.php	(revision 5912)
@@ -2279,5 +2279,5 @@
 				);
 			}
-			elseif (preg_match ("+^$this->fakebase\/(.*)$+U", $p->fake_full_path, $matches))
+			elseif (ereg("+^$this->fakebase\/(.*)$+U", $p->fake_full_path, $matches))
 			{
 				$set_attributes_array = Array(
@@ -2372,5 +2372,5 @@
 			for($i=0;$i<sizeof($contents);$i++)
 			{
-				if (!ereg("^#",$contents[$i]))
+				if (!preg_match('/^#/',$contents[$i]))
 				{
 					$line=split("[[:space:]]+", $contents[$i]);
@@ -2594,5 +2594,5 @@
 			);
 		
-			if ($data['checksubdirs']==False && ereg('.*/$', $data['string']) && $data['nofiles'] )
+			if ($data['checksubdirs']==False && preg_match('/.*\/$/', $data['string']) && $data['nofiles'] )
 			{
 $this->debug('Returning empty for'.$data['string']);
Index: /trunk/phpgwapi/inc/class.xml.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xml.inc.php	(revision 5509)
+++ /trunk/phpgwapi/inc/class.xml.inc.php	(revision 5912)
@@ -504,5 +504,5 @@
     {
         // Check whether the node is an attribute node.
-        if ( ereg("/attribute::", $node) )
+        if ( preg_match('/\/attribute::/', $node) )
         {
             // Get the path to the attribute node's parent.
@@ -622,5 +622,5 @@
     {
         // Check whether it's an attribute node.
-        if ( ereg("/attribute::", $path) )
+        if ( preg_match('/\/attribute::/', $path) )
         {
             // Get the path to the attribute node's parent.
@@ -659,5 +659,5 @@
     {
         // Check whether it's an attribute node.
-        if ( ereg("/attribute::", $path) )
+        if ( preg_match('/\/attribute::/', $path) )
         {
             // Get the path to the attribute node's parent.
@@ -698,5 +698,5 @@
     {
         // Check whether it's an attribute node.
-        if ( ereg("/attribute::", $path) )
+        if ( preg_match('/\/attribute::/', $path) )
         {
             // Get the path to the attribute node's parent.
@@ -1063,5 +1063,5 @@
         
         // Check whether there are predicates.
-        if ( ereg("\[", $step) )
+        if ( preg_match('/\[/', $step) )
         {
             // Get the predicates.
@@ -1109,5 +1109,5 @@
                 $axis["node-test"] = "*";
             }
-            elseif ( ereg("\(", $step) )
+            elseif ( preg_match('/\(/', $step) )
             {
                 // Check whether it's a function.
@@ -1164,5 +1164,5 @@
                 $axis["node-test"] = "*";
             }
-            elseif ( ereg("^[a-zA-Z0-9\-_]+$", $step) )
+            elseif ( preg_match('/^[a-zA-Z0-9\-_]+$/', $step) )
             {
                 // Select the child axis and the child.
@@ -1506,5 +1506,5 @@
             {
                 // Check whether there's a - sign in the function name.
-                if ( ereg("-", $function) )
+                if ( preg_match('/-/', $function) )
                 {
                     // Get the position of the - in the function name.
@@ -1625,5 +1625,5 @@
         
         // Check whether the predicate is a function.
-        if ( ereg("\(", $predicate) )
+        if ( preg_match('/\(/', $predicate) )
         {
             // Get the position of the first bracket.
@@ -1674,6 +1674,6 @@
         
         // Check whether the predicate is just a digit.
-        if ( ereg("^[0-9]+(\.[0-9]+)?$", $predicate) ||
-            ereg("^\.[0-9]+$", $predicate) )
+        if ( preg_match('/^[0-9]+(\.[0-9]+)?$/', $predicate) ||
+            preg_match('/^\.[0-9]+$/', $predicate) )
         {
             // Return the value of the digit.
@@ -1728,5 +1728,5 @@
             {
                 // Check whether the predicate is just an number.
-                if ( ereg("^[0-9]+$", $predicate) )
+                if ( preg_match('/^[0-9]+$/', $predicate) )
                 {
                     // Enhance the predicate.
@@ -1796,5 +1796,5 @@
     {
         // Check whether it's a function.
-        if ( ereg("\(", $node_test) )
+        if ( preg_match('/\(/', $node_test) )
         {
             // Get the type of function to use.
@@ -1872,5 +1872,5 @@
             return true;
         }
-        elseif ( ereg("^[a-zA-Z0-9\-_]+", $node_test) )
+        elseif ( preg_match('/^[a-zA-Z0-9\-_]+/', $node_test) )
         {
             // Check whether the node-test can be fulfilled.
@@ -2602,6 +2602,6 @@
     {
         // Check what type of parameter is given
-        if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||
-            ereg("^\.[0-9]+$", $arguments) )
+        if ( preg_match('/^[0-9]+(\.[0-9]+)?$/', $arguments) ||
+            preg_match('/^\.[0-9]+$/', $arguments) )
         {
             // Convert the digits to a number.
@@ -2711,5 +2711,5 @@
             
         // Check whether the first string starts with the second one.
-        if ( ereg("^".$second, $first) )
+        if ( preg_match('/^/'.$second, $first) )
         {
             // Return true.
@@ -2749,5 +2749,5 @@
             
         // Check whether the first string starts with the second one.
-        if ( ereg($second, $first) )
+        if ( preg_match('/'.$second.'/', $first) )
         {
             // Return true.
@@ -2945,6 +2945,6 @@
         
         // Check what type of parameter is given
-        if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||
-            ereg("^\.[0-9]+$", $arguments) )
+        if ( preg_match('/^[0-9]+(\.[0-9]+)?$/', $arguments) ||
+            preg_match('/^\.[0-9]+$/', $arguments) )
         {
             // Convert the digits to a number.
@@ -3138,6 +3138,6 @@
     {
         // Check the type of argument.
-        if ( ereg("^[0-9]+(\.[0-9]+)?$", $arguments) ||
-            ereg("^\.[0-9]+$", $arguments) )
+        if ( preg_match('/^[0-9]+(\.[0-9]+)?$/', $arguments) ||
+            preg_match('/^\.[0-9]+$/', $arguments) )
         {
             // Return the argument as a number.
Index: /trunk/phpgwapi/templates/classic/login_classic.php
===================================================================
--- /trunk/phpgwapi/templates/classic/login_classic.php	(revision 3243)
+++ /trunk/phpgwapi/templates/classic/login_classic.php	(revision 5912)
@@ -294,5 +294,5 @@
 	foreach($_GET as $name => $value)
 	{
-		if(ereg('phpgw_',$name))
+		if(preg_match('/phpgw_/',$name))
 		{
 			$extra_vars .= '&' . $name . '=' . urlencode($value);
Index: /trunk/mobile/inc/class.ui_preferences.inc.php
===================================================================
--- /trunk/mobile/inc/class.ui_preferences.inc.php	(revision 4277)
+++ /trunk/mobile/inc/class.ui_preferences.inc.php	(revision 5912)
@@ -58,5 +58,5 @@
 			foreach($vars as $name => $value)
 			{
-				if (ereg('^lang_', $name) !== false)
+				if (preg_match('/^lang_/', $name) !== false)
 				{
 					$GLOBALS['phpgw']->template->set_var($name, lang(str_replace('_',' ',substr($name, 5))));
Index: /trunk/filemanager/inc/class.vfs_functions.inc.php
===================================================================
--- /trunk/filemanager/inc/class.vfs_functions.inc.php	(revision 5509)
+++ /trunk/filemanager/inc/class.vfs_functions.inc.php	(revision 5912)
@@ -436,5 +436,5 @@
 					$_return[] = array( "error" => $badchar);	
 				}
-				if(ereg("/", $this->to) || ereg("\\\\", $this->to))
+				if(preg_match('/\//', $this->to) || preg_match('/\\\\/', $this->to))
 				{
 					$_return[] = array( "error"=> "slashes");
Index: /trunk/filemanager/inc/class.bofilemanager.inc.php
===================================================================
--- /trunk/filemanager/inc/class.bofilemanager.inc.php	(revision 5509)
+++ /trunk/filemanager/inc/class.bofilemanager.inc.php	(revision 5912)
@@ -227,5 +227,5 @@
 				}
 			}
-			elseif ($this->hostname != "" && ereg('^'.$this->hostname, $string))
+			elseif ($this->hostname != "" && preg_match('/^/'.$this->hostname, $string))
 //			elseif (ereg ('^'.$this->hostname, $string))
 			{
Index: /trunk/listAdmin/docs/manageheader.php
===================================================================
--- /trunk/listAdmin/docs/manageheader.php	(revision 3514)
+++ /trunk/listAdmin/docs/manageheader.php	(revision 5912)
@@ -30,5 +30,5 @@
 	 */
 	$realpath = realpath('..');
-	if(!ereg('^' . $_SERVER['DOCUMENT_ROOT'],$realpath))
+	if(!preg_match('/^/' . $_SERVER['DOCUMENT_ROOT'],$realpath))
 	{
 		if(PHP_OS == 'Windows')
Index: /trunk/listAdmin/inc/sieve-php.lib.php
===================================================================
--- /trunk/listAdmin/inc/sieve-php.lib.php	(revision 3514)
+++ /trunk/listAdmin/inc/sieve-php.lib.php	(revision 5912)
@@ -372,5 +372,5 @@
     //So, if we see IMLEMENTATION in the first line, then we are done.
 
-    if(ereg("IMPLEMENTATION",$this->line))
+    if(preg_match('/IMPLEMENTATION/',$this->line))
     {
       //we're on the Cyrus V2 sieve server
@@ -767,5 +767,5 @@
     //So, if we see IMLEMENTATION in the first line, then we are done.
 
-    if(ereg("IMPLEMENTATION",$this->line))
+    if(preg_match('/IMPLEMENTATION/',$this->line))
     {
       //we're on the Cyrus V2 sieve server
Index: /trunk/admin/inc/class.boaccess_history.inc.php
===================================================================
--- /trunk/admin/inc/class.boaccess_history.inc.php	(revision 2)
+++ /trunk/admin/inc/class.boaccess_history.inc.php	(revision 5912)
@@ -54,5 +54,5 @@
 				}
 
-				if (ereg('@',$record['loginid']))
+				if (preg_match('/@/',$record['loginid']))
 				{
 					$t = split('@',$record['loginid']);
Index: /trunk/admin/inc/class.bocurrentsessions.inc.php
===================================================================
--- /trunk/admin/inc/class.bocurrentsessions.inc.php	(revision 2)
+++ /trunk/admin/inc/class.bocurrentsessions.inc.php	(revision 5912)
@@ -31,5 +31,5 @@
 			while (list(,$value) = @each($values))
 			{
-				if (ereg('@',$value['session_lid']))
+				if (preg_match('/@/',$value['session_lid']))
 				{
 					$t = split('@',$value['session_lid']);
Index: /trunk/contactcenter/inc/class.abo_catalog.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.abo_catalog.inc.php	(revision 5131)
+++ /trunk/contactcenter/inc/class.abo_catalog.inc.php	(revision 5912)
@@ -356,5 +356,5 @@
 						for($k = 0; $k < $n_joins; $k++)
 						{
-							if (ereg($query_join_reg,$query_fields_joins[$k]))
+							if (preg_match('/'.$query_join_reg.'/',$query_fields_joins[$k]))
 							{	
 								$unique = false;
@@ -430,5 +430,5 @@
 						for($k = 0; $k < $n_joins; $k++)
 						{
-							if (ereg($query_join_reg,$query_restric_joins[$k]))
+							if (preg_match('/'.$query_join_reg.'/',$query_restric_joins[$k]))
 							{	
 								$unique = false;
Index: /trunk/contactcenter/inc/class.ui_preferences.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.ui_preferences.inc.php	(revision 3707)
+++ /trunk/contactcenter/inc/class.ui_preferences.inc.php	(revision 5912)
@@ -122,5 +122,5 @@
 			foreach($vars as $name => $value)
 			{
-				if (ereg('^lang_', $name) !== false)
+				if (preg_match('/^lang_/', $name) !== false)
 				{
 					$GLOBALS['phpgw']->template->set_var($name, lang(str_replace('_',' ',substr($name, 5))));
Index: /trunk/calendar/csv_import.php
===================================================================
--- /trunk/calendar/csv_import.php	(revision 204)
+++ /trunk/calendar/csv_import.php	(revision 5912)
@@ -373,5 +373,5 @@
 					foreach($trans[$csv_idx] as $pattern => $replace)
 					{
-						if (ereg((string) $pattern,$val))
+						if (preg_match((string) '/'.$pattern.'/',$val))
 						{
 							// echo "<p>csv_idx='$csv_idx',info='$info',trans_csv=".print_r($trans_csv).",ereg_replace('$pattern','$replace','$val') = ";
@@ -380,5 +380,5 @@
 
 							$reg = $CPreReg.'([a-zA-Z_0-9]+)'.$CPosReg;
-							while (ereg($reg,$val,$vars))
+							while (preg_match('/'.$reg.'/',$val,$vars))
 							{	// expand all CSV fields
 								$val = str_replace($CPre.$vars[1].$CPos,$val[0] == '@' ? "'".addslashes($fields[array_search($vars[1],$csv_fields)])."'" : $fields[array_search($vars[1],$csv_fields)],$val);
@@ -464,5 +464,5 @@
 						$values[$date] = ereg_replace('([0-9]{2}).([0-9]{2}).([0-9]{4})','\3-\2-\1',$values[$date]);
 						// remove fractures of seconds if present at the end of the string
-						if (ereg('(.*)\.[0-9]+',$values[$date],$parts)) $values[$date] = $parts[1];
+						if (preg_match('/(.*)\.[0-9]+/',$values[$date],$parts)) $values[$date] = $parts[1];
 						$values[$date] = strtotime($values[$date]);
 					}
Index: /trunk/expressoMail1_2/login_offline.php
===================================================================
--- /trunk/expressoMail1_2/login_offline.php	(revision 1932)
+++ /trunk/expressoMail1_2/login_offline.php	(revision 5912)
@@ -251,5 +251,5 @@
 	/*foreach($_GET as $name => $value)
 	{
-		if(ereg('phpgw_',$name))
+		if(preg_match('/phpgw_/',$name))
 		{
 			$extra_vars .= '&' . $name . '=' . urlencode($value);
