CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions:
Please help with this..

 



anandsoft
New User

Dec 5, 2009, 1:47 PM

Post #1 of 1 (3152 views)
Please help with this.. Can't Post

I have an email forwarded to a script that needs to be written to the database:

Ref # = 307501245
Email = me@domain.com

The script goes something like this:

$break_msg=explode("\n",$message);
for($i=0;$i<count($break_msg);$i++)
{
if(preg_match("/^Reference Number# = (.*)/",$break_msg[$i],$matches))
{
$OrderID=$matches[1];
}
if(preg_match("/^Email = (.*)/",$break_msg[$i],$matches))
{
$Email=$matches[1];

I am able to run the script with a ":" sign (ex: Ref # : 307501245) but not with "=" sign. The returned message is showing Ref # =3D 307501245.

Could some one help with the correct code?

thanks,
Vijay.


(This post was edited by anandsoft on Dec 5, 2009, 1:52 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives