<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
ereg was not the main problem we cam across it was the removal of the
split function which was being used in loads of places for internally
passing csv strings about the place then splitting to an array for
processing.  A real strange one to get depracated!<br>
<br>
Alex Mace wrote:
<blockquote
 cite="mid:72DE5D1A-87C2-4EB7-AA4F-39304CCC3874@hollytree.co.uk"
 type="cite">Nah, I didn't get caught by that, fortunately because I've
never really used the ereg libraries, plus I had compiled PHP myself
before I upgraded.
  <div><br>
  </div>
  <div>We did get caught in work though when someone upgraded to 5.3 on
one of the boxes we run scripts on though as a lot of our legacy code
base does use ereg...</div>
  <div><br>
  </div>
  <div>Alex</div>
  <div><br>
  <div>
  <div>On 14 Oct 2009, at 00:25, Dave Holmes wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite">
    <div bgcolor="#ffffff" text="#000000"> That's sound like a man with
snow leopard which foisted 5.3 in as part of the upgrade ;)<br>
    <br>
All ours app's started to moan about quite a few things... <br>
    <br>
    <br>
Alex Mace wrote:
    <blockquote
 cite="mid:73DD6C06-5164-4AC3-B145-3D61EE6D9DB7@hollytree.co.uk"
 type="cite">
      <pre wrap="">Apart from the fact that eregi was deprecated in PHP 5.3 and will be  
removed in 6...

Alex

On 13 Oct 2009, at 23:09, <a moz-do-not-send="true"
 class="moz-txt-link-rfc2396E"
 href="mailto:phil@infolinkelectronics.co.uk">&lt;phil@infolinkelectronics.co.uk&gt;</a> wrote:

  </pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">You'd be best off performing some sort of regular expression match -
or using the filter extension ...

$email = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL);
if(!$email) {
       // invalid email address
}
(Requires PHP5, I think my syntax/usage is correct, but I've not
checked it)
      </pre>
        </blockquote>
        <pre wrap="">The regex is (acting on the incoming variable $emaila)

if (!eregi (<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="mailto:%5E%28%5Ba-z0-9_%5D%7C%5C%5C-%7C%5C%5C.%29+@%28%28%5Ba-z0-9_%5D%7C%5C%5C-%29+%5C%5C.%29+%5Ba-z%5D%7B2,4%7D$">"^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$"</a>,
$emaila)) error_alert("Invalid Email Address");

where:-

function error_alert($msg){global $flag; $flag = 1; echo
"&lt;script&gt;alert(\"Error: $msg\");history.go(-1)&lt;/script&gt;";}

Thats from a page where the form, validation and sending are done as  
three
invocations via a switch, case, do something and break method. a -1  
history
kickback works.
The eregi bit should be fairly PHP version unspecific though.

Regards,

Phil Beynon
Sales &amp; Operations Director

** Infolink Electronic Systems Ltd.
** S/W Birmingham's Longest Established ISV &amp; VAR
** <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.infolinkelectronics.co.uk">http://www.infolinkelectronics.co.uk</a>
** Professional Web 2.0 Design &amp; Advanced Hosting Platforms
** <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.coeus-computica.co.uk">http://www.coeus-computica.co.uk</a>
** Affordable Knowledgebase Solutions
** Contact: <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:Sales@infolinkelectronics.co.uk">Sales@infolinkelectronics.co.uk</a>
** Tel / Fax 0121 441 3558
&lt;Phil Beynon.vcf&gt;_______________________________________________
Phpwm mailing list
Website : <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.phpwm.org">http://www.phpwm.org</a>
Twitter : <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.twitter.com/phpwm">http://www.twitter.com/phpwm</a>
Facebook: <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.facebook.com/group.php?gid=2361609907">http://www.facebook.com/group.php?gid=2361609907</a>

Post to list: <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a>
Archive etc : <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a>
    </pre>
      </blockquote>
      <pre wrap=""><!---->

_______________________________________________
Phpwm mailing list
Website : <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.phpwm.org">http://www.phpwm.org</a>
Twitter : <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.twitter.com/phpwm">http://www.twitter.com/phpwm</a>
Facebook: <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.facebook.com/group.php?gid=2361609907">http://www.facebook.com/group.php?gid=2361609907</a>

Post to list: <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a>
Archive etc : <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a>

  </pre>
    </blockquote>
    </div>
_______________________________________________<br>
Phpwm mailing list<br>
Website : <a moz-do-not-send="true" href="http://www.phpwm.org">http://www.phpwm.org</a><br>
Twitter : <a moz-do-not-send="true" href="http://www.twitter.com/phpwm">http://www.twitter.com/phpwm</a><br>
Facebook: <a moz-do-not-send="true"
 href="http://www.facebook.com/group.php?gid=2361609907">http://www.facebook.com/group.php?gid=2361609907</a><br>
    <br>
Post to list: <a moz-do-not-send="true"
 href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a><br>
Archive etc : <a moz-do-not-send="true"
 href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a></blockquote>
  </div>
  <br>
  </div>
</blockquote>
</body>
</html>