p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Pro PHP (http://p2p.wrox.com/forumdisplay.php?f=96)
-   -   regular expression (http://p2p.wrox.com/showthread.php?t=12439)

Moharo April 29th, 2004 11:05 AM

regular expression
hi there

another silly question to ask.... what would be the regular expression syntax for any email address ending ONLY with ".edu"???

the genuine genius

skicrud April 29th, 2004 02:05 PM

found a solution

include ("header.php");
        if ((ereg("[^1]$",$lvar)) && (ereg("[^\d\w]$",$lvalue))){ //if var does not end in a 1 and

                                        //value not null
        //echo "$lvar=$lvalue<br>"; //echo the var and its value
        //echo "$lvar ";
        //echo "$statement<br>";
        $name=$name . $lvar . ","; //built var string
        $value=$value . $lvalue . "','";
        //echo "$lvalue ";
$length=strlen($name); //get length of string
$name="($name)"; //strip out last comma
echo "$name<br>";
echo "$value<br>";
$sql="INSERT into msdsmasterlist $name VALUES $value ";
echo $sql;
echo $num_rows;
echo $errors;

Daniel Walker April 30th, 2004 04:17 AM

Hmm. It may be a solution, but it does not seem to be a solution to Moharo's problem.

Moharo, is this any good to you?


Moharo April 30th, 2004 04:44 AM

big thanx mr. Walker... peace


the genuine genius

All times are GMT -4. The time now is 09:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.