Re: [PATCH] [154/2many] MAINTAINERS - DIGI INTL. EPCA DRIVER

Cal Peake
2007-08-14T04:30:26Z

On Mon, 13 Aug 2007, Joe Perches wrote:

> On Mon, 2007-08-13 at 09:35 -0700, Joe Perches wrote:
> > On Mon, 2007-08-13 at 09:15 -0700, Kok, Auke wrote:
> > > or properly put it on "quotes":
> >
> > I'll improve the script and revert the name changes.
>
> # check for "must quote" chars in name
>
> sub format_email {
> my ($name, $email) = @_;
>
> if ($name =~ tr@,\@<>@@) {
> $formatted_email = "\"${name}\"\ \<${email}\>";
> } else {
> $formatted_email = "${name} \<${email}\>";
> }
> return $formatted_email;
> }
>
> Anyone know what chars require the name be quoted?
> I've got: "," "@" "<" ">" ?

Prolly /[^a-z0-9]/i would the safest bet. Also don't forget to escape
double quotes (e.g. "Jonathan \"Jon\" Doe" <jon@example.net>).

Cheers,
--
Cal Peake