I purchased a "Mail This Page To A Friend" script that I'm doing some
tweaking on, but I can't figure out a particular item in the function that
parses HTML code to be formatted into a standard e-mail message.

Here's the convention the parser is using ...

$mail_body =~ s/\"/"/g;

In other words, replace " with " in the e-mail.

Now, here's what I want to do. Extract image HTML code in this format ...

<img src="images/imagename.jpg" width="x" height="y" alt="[ Image
Description ]">

.... so that only the Image Description is left. Basically, I want to delete
all the rest of the code but leave the "alt" tag information intact.

I've tried this, but it doesn't work ...

$mail_body =~ s/<img src\=\"([^>])*\"//g;
$mail_body =~ s/width\=\"\d\"//g;
$mail_body =~ s/height\=\"\d\"//g;
$mail_body =~ s/alt\=\"\[//g;
$mail_body =~ s/\]\">//g;

Any ideas?



Thanks,

Jason

__________________________________________________________

Jason LaMar                  tel >> 740-368-3307
Director of Web Services     fax >> 740-368-3328
Ohio Wesleyan University     e-mail >> [EMAIL PROTECTED]
Delaware, OH 43015           online >> http://web.owu.edu/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to