Re: [PBML] Test a $1 value that came from a regex; true, false?
- --- In email@example.com, Alan <acelists@c...> wrote:
> That's been working, even with that one weird header. I got rid ofthe $1 entirely, also, trimmed at 9 instead of 0 with substr().
>Minor picky point:
> $subj = substr($subj, 9, 44);
For clarity I suggest you add a comment to explain what 9 and 44 mean.
9 I presumet is length( 'Subject: ' ).
You could change the line to:
$subj = substr($subj, length( 'Subject: ' ), 44);
and this would mean that the comment for 9 would be unnecessary.
I don't know what 44 is for and when you revisit the script in a few
weeks/months/years you or the future maintainer may not remember.