Gotta question:
I want to match things like ':|' ':_|' and exchange them for images. I have the exchange part down, but things with a '|' in the expression do not work. I've tried the following with no luck. Much thanks!
$message =~ s/\Q?:|\E/\<img border=\"0\" src=\"$imagesdir\/huh.gif\" alt="Huh">/g;
$message =~ s/(\W|\A)\?\:\|/$1\<img border=\"0\" src=\"$imagesdir\/huh.gif\" alt="Huh">/g;
$message =~ s/(\W)\?\:\|/$1\<img border=\"0\" src=\"$imagesdir\/huh.gif\" alt="Huh">/g;
...amoungst other possiblities. What am I missing?
I want to match things like ':|' ':_|' and exchange them for images. I have the exchange part down, but things with a '|' in the expression do not work. I've tried the following with no luck. Much thanks!
$message =~ s/\Q?:|\E/\<img border=\"0\" src=\"$imagesdir\/huh.gif\" alt="Huh">/g;
$message =~ s/(\W|\A)\?\:\|/$1\<img border=\"0\" src=\"$imagesdir\/huh.gif\" alt="Huh">/g;
$message =~ s/(\W)\?\:\|/$1\<img border=\"0\" src=\"$imagesdir\/huh.gif\" alt="Huh">/g;
...amoungst other possiblities. What am I missing?