Hello,
Am Sonntag, 6. Januar 2013 schrieb Tanstaafl:
> On 2013-01-06 11:59 AM, Christian Boltz wrote:
> > Am Samstag, 5. Januar 2013 schrieb Tanstaafl:
> >> In the 'Take headers apart' section, where all of the stuff goes to
> >> determine what NOT to send auto-replies to, there is stuff like:
> >>
> >> elsif (/^Reply\-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader =
> >> \$replyto; }
> >>
> >> However, in earlier version of vacation.pl, it was:
> >>
> >> elsif (/^reply-to:\s*(.*)\s*\n$/i) { $replyto = $1; $lastheader =
> >> \$replyto; }
> >>
> >> Aside from escaping the '-',
> >
> > which was superfluous ;-)
BTW: s/was/is/ - it's still there ;-)
> ? The '-' is currently escaped (in vacaion.pl 2.3.6) - are you saying
> it doesn't need to be?
Exactly. It doesn't hurt, but it's not needed. (Not only in the Reply-To
check.)
The only place where - has a special meaning in regexes is inside square
brackets like [a-f] which matches the letters a, b, c, d, e and f.
To make it more interesting, you can't escape - inside []. Instead you
have to add it at the beginning or the end if you want to match a -
inside [], for example [a-f-] or [-a-f] will match a, b, c, d, e, f
and - (using [a-f\-] would also allow a \).
Regards,
Christian Boltz
--
Hmm.. Good point Adrian. I should get used to that thing
close to my keyboard... how did you call it? Mouse? :-)
[Dominique Leuenberger in opensuse-factory]
|