Index: /trunk/phpgwapi/inc/class.sessions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.sessions.inc.php	(revision 5281)
+++ /trunk/phpgwapi/inc/class.sessions.inc.php	(revision 6037)
@@ -1184,5 +1184,5 @@
 						if( preg_match('/\[\]/i', $b[0]) )
 						{
-							$b[0] = eregi_replace("\[\]", "[$i]", $b[0]);
+							$b[0] = preg_replace('/\[\]/i', "[$i]", $b[0]);
 						}
 					}
Index: /trunk/phpgwapi/inc/class.interserver.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.interserver.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.interserver.inc.php	(revision 6037)
@@ -81,5 +81,5 @@
 		function interserver($serverid='')
 		{
-			$url = eregi_replace('https*://[^/]*/','',$GLOBALS['phpgw_info']['server']['webserver_url']);
+			$url = preg_replace('/https*:\/\/[^\/]*\//i','',$GLOBALS['phpgw_info']['server']['webserver_url']);
 			$this->urlparts = array(
 				'xmlrpc' => $url.'/xmlrpc.php',
Index: /trunk/phpgwapi/inc/class.xml.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.xml.inc.php	(revision 5928)
+++ /trunk/phpgwapi/inc/class.xml.inc.php	(revision 6037)
@@ -3378,5 +3378,5 @@
 			
 			// Replace the last separator.
-			$command = eregi_replace(", $", ");", $command);
+			$command = preg_replace('/, $/i', ');', $command);
 			
 			// Execute the command.
Index: /trunk/mobile/inc/class.ui_mobilemail.inc.php
===================================================================
--- /trunk/mobile/inc/class.ui_mobilemail.inc.php	(revision 5620)
+++ /trunk/mobile/inc/class.ui_mobilemail.inc.php	(revision 6037)
@@ -317,6 +317,6 @@
 			// Fix problem with cyrus delimiter changes in preferences.
 			// Dots in names: enabled/disabled.
-			$save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']);
-			$save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder);
+			$save_in_folder = @preg_replace('/INBOX//i', "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']);
+			$save_in_folder = @preg_replace('/INBOX./i', "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder);
 			$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder;
 			// End Fix.
Index: /trunk/filemanager/inc/class.bofilemanager.inc.php
===================================================================
--- /trunk/filemanager/inc/class.bofilemanager.inc.php	(revision 5940)
+++ /trunk/filemanager/inc/class.bofilemanager.inc.php	(revision 6037)
@@ -138,10 +138,10 @@
 			if ($all)
 			{
-				if (preg_match("-([\\/<>\|\'\"\&])-", $string, $badchars))
+				if (preg_match('/-([\\/<>\|\'\"\&])-/', $string, $badchars))
 				$rstring = $badchars[1];
 			}
 			else
 			{
-				if (preg_match("-([\\/<>])-", $string, $badchars))
+				if (preg_match('/-([\\/<>])-/', $string, $badchars))
 				$rstring = $badchars[1];
 			}
@@ -212,5 +212,5 @@
 		{
 			//var_dump($string);
-			if (preg_match ("/=(.*)(&|$)/U", $string))
+			if (preg_match('/\/=(.*)(&|$)\/U/', $string))
 			{
 				$rstring = $string;
@@ -228,5 +228,5 @@
 			}
 			elseif ($this->hostname != "" && preg_match("/^$this->hostname/", $string))
-//			elseif (ereg ('^'.$this->hostname, $string))
+//			elseif (preg_match ("/^$this->hostname/", $string))
 			{
 				$rstring = preg_replace("/^$this->hostname\//", '', $string);
@@ -239,5 +239,5 @@
 
 				/* Terrible hack, decodes all /'s back to normal */  
-				$rstring = preg_replace ("/%2F/", '/', $rstring);
+				$rstring = preg_replace('/%2F/', '/', $rstring);
 			}
 
Index: /trunk/calendar/inc/class.boicalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.boicalendar.inc.php	(revision 5921)
+++ /trunk/calendar/inc/class.boicalendar.inc.php	(revision 6037)
@@ -2383,5 +2383,5 @@
 					//						if(preg_match('/D/', $_f_['day_raw']))
 					if (strstr($_f_['day_raw'], 'D')) {
-							$dur['days'] = eregi_replace("([0-9]+)D(.*)", "\\1", $_f_['day_raw']);
+							$dur['days'] = preg_replace('/([0-9]+)D(.*)/i', '\\1', $_f_['day_raw']);
 						}
 
@@ -2389,5 +2389,5 @@
 					//						if(preg_match('/W/', $_f_["day_raw"]))
 					if (strstr($_f_['day_raw'], 'W')) {
-							$dur['weeks'] = eregi_replace("([^|.*]+D)?([0-9]+)W", "\\2", $_f_['day_raw']);
+							$dur['weeks'] = preg_replace('/([^|.*]+D)?([0-9]+)W/i', '\\2', $_f_['day_raw']);
 						}
 					}
@@ -2398,5 +2398,5 @@
 					//						if(preg_match('/H/', $_f_["time_raw"]))
 					if (strstr($_f_['time_raw'], 'H')) {
-							$dur['hours'] = eregi_replace("([0-9]+)H(.*)", "\\1", $_f_['time_raw']);
+							$dur['hours'] = preg_replace('/([0-9]+)H(.*)/i', '\\1', $_f_['time_raw']);
 						}
 
@@ -2405,5 +2405,5 @@
 					//						if(preg_match('/M/', $_f_["time_raw"]))
 					if (strstr($_f_['time_raw'], 'M')) {
-							$dur['minutes'] = eregi_replace("([^|.*]+H)?([0-9]+)M(.*)", "\\2", $_f_['time_raw']);
+							$dur['minutes'] = preg_replace('/([^|.*]+H)?([0-9]+)M(.*)/i', '\\2', $_f_['time_raw']);
 						}
 
@@ -2412,5 +2412,5 @@
 					//						if(preg_match('/S/', $_f_["time_raw"]) )
 					if (strstr($_f_['time_raw'], 'S')) {
-							$dur['seconds'] = eregi_replace("([^|.*]+M)?([0-9]+)S(.*)", "\\2", $_f_['time_raw']);
+							$dur['seconds'] = preg_replace('/([^|.*]+M)?([0-9]+)S(.*)/i', '\\2', $_f_['time_raw']);
 						}
 					}
Index: /trunk/workflow/inc/class.bo_utils.inc.php
===================================================================
--- /trunk/workflow/inc/class.bo_utils.inc.php	(revision 5928)
+++ /trunk/workflow/inc/class.bo_utils.inc.php	(revision 6037)
@@ -66,5 +66,5 @@
 	{ 
 		// parâmetro a ser procurado no ldap
-		$cn = trim(ereg_replace(' +', ' ', $params['cn']));
+		$cn = trim(preg_replace('/ +/', ' ', $params['cn']));
 
 		$output           = array();
Index: /trunk/workflow/inc/class.powergraphic.inc.php
===================================================================
--- /trunk/workflow/inc/class.powergraphic.inc.php	(revision 5921)
+++ /trunk/workflow/inc/class.powergraphic.inc.php	(revision 6037)
@@ -1143,5 +1143,5 @@
                     $this->color['line_2'] = imagecolorallocate($this->img, 220, 200,  50);
                 }
-                else if (ereg("^(5|6)$", $this->type))
+                else if (preg_match('/^(5|6)$/', $this->type))
                 {
                     $this->color['arc_1']        = imagecolorallocate($this->img, 100, 150, 200);
Index: /trunk/workflow/inc/class.bo_adminjobs.inc.php
===================================================================
--- /trunk/workflow/inc/class.bo_adminjobs.inc.php	(revision 3167)
+++ /trunk/workflow/inc/class.bo_adminjobs.inc.php	(revision 6037)
@@ -109,5 +109,5 @@
 		foreach ($logs as $key => $value)
 		{
-			$logs[$key]['date_time'] = ereg_replace("([[:digit:]]{4})-([[:digit:]]{2})-([[:digit:]]{2}) ([[:digit:]]{2}):([[:digit:]]{2}):00", '\3/\2/\1 \4h\5', $value['date_time']);
+			$logs[$key]['date_time'] = preg_replace('/([[:digit:]]{4})-([[:digit:]]{2})-([[:digit:]]{2}) ([[:digit:]]{2}):([[:digit:]]{2}):00/', '\3/\2/\1 \4h\5', $value['date_time']);
 			$currentDate = $value['date_time'];
 			if (isset($writtenDates[substr($logs[$key]['date_time'], 0, 10)]))
Index: /trunk/expressoMail1_2/offline.php
===================================================================
--- /trunk/expressoMail1_2/offline.php	(revision 5509)
+++ /trunk/expressoMail1_2/offline.php	(revision 6037)
@@ -129,6 +129,6 @@
 	// Fix problem with cyrus delimiter changes in preferences.
 	// Dots in names: enabled/disabled.
-	$save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']);
-	$save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder);
+	$save_in_folder = @preg_replace('/INBOX//i', "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']);
+	$save_in_folder = @preg_replace('/INBOX./i', "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder);
 	$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder;
 	// End Fix.
Index: /trunk/expressoMail1_2/inc/class.imap_attachment.inc.php
===================================================================
--- /trunk/expressoMail1_2/inc/class.imap_attachment.inc.php	(revision 5509)
+++ /trunk/expressoMail1_2/inc/class.imap_attachment.inc.php	(revision 6037)
@@ -93,5 +93,5 @@
 	   	$str = "";
 	   	foreach ($array as $key => $part)
-	   		$str .= @eregi_replace("\{", "[",@eregi_replace("\}", "]",$part->text));
+	   		$str .= @preg_replace('/\{\/i', '['',@preg_replace('\/\}/i', ']',$part->text));
 	   	
    		return $str;
