--- Troy May <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm having a problem with a bulletin board I'm setting up. All the smilies
> work except for one, the wink one. which be called when you type in ";)".
> It won't display the graphic. All the others are fine so I know's it not a
> config or directory problem. Here's the regex that looks for it:
>
> $message =~ s/(\W|\A)\;\-\)/$1\<img src=$cfg{'nonCgiPath'}\/wink.gif\>/g;
>
> Am I missing something here?
>
> Thanks in advance.
Hi Troy,
Assuming that you want to match both ';)' and ';-)', you can do this:
$message =~ s/(;-?\))/$1<img src="cfg{'nonCgiPath'}\/wink.gif">/g;
Note that I have deliberately wrapped the attribute value in quotes. This is the
proper way to
handle HTML and can stop a lot of problems later on.
Cheers,
Curtis "Ovid" Poe
=====
"Ovid" on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]