Sep 5, 2006, 2:20 AM
The mail from the forum has \' in it, the regexp substitutes the ' in \' so it will end in \\' where the first \ escapes the second \ and leaves a normal'. Now the text has a regular ' and the script crashes.
Re: [saaiber] substitute \' in mail with '
Uncomment the line and all original ' will create the problem. You have to test if an ' is escaped allready but it might be easier to also substitute the original \:
try this one:
But what if someone sends you some nice ASCII art by mail? \\'O'//
Well most of it would be destroyed by the other substitution operators but not the backslashes. Maybe < $body =~ s/<[\/!]*?[^<>]*?>//g; > doesn't exactly do what you want.
(I took another look because I wondered how it handled normal backslashes in the text but it doesn't do anything with them it seems)
Don't reinvent the wheel, use it, abuse it or hack it.
(This post was edited by rork on Sep 5, 2006, 10:11 AM)