On Mon, 2002-02-04 at 13:38, Daniel Pittman wrote: > Better that you do: > > } elsif (/^([^\x00-\x1f\x7f-\xff :]+):\s*(.*)$/) { > > or > > } elsif (/^([^\x00-\x1f\x7f-\xff :]+):\s?(.*)$/) { > > ...depending on personal taste. That way the space is still removed if > it's present.
Based on reading the RFC, I think the whitespace is actually technically part of the header's value (well, could probably be argued to be anyway), so I'm now picking up everything after the colon in $2. Not to worry though, because the spaces get eliminated about 2 or 3 lines later in the code anyway. So here's the regex that's in CVS now: } elsif (/^([^\x00-\x20\x7f-\xff:]+):(.*)$/) { I also rolled the space in the first part into the \xnn-\xnn range too, just cos. I'm still somewhat baffled about why things weren't working in the first place with that particular example though, but perhaps by tinkering with the regex we've now magically made it work. I'll see if we continue seeing more occurrences from people on the new codeline. C _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk