Re: git send-email --notmuch expr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jed Brown <jed@xxxxxxxx> writes:

> 	} elsif (/^(?:To|Cc|Bcc):/i) {
> 		print "To/Cc/Bcc fields are not interpreted yet, they have been ignored\n";
> 		next;
> 	}
> 
> This regex doesn't match these headers (is the leading ?: a typo?) so
> there is no warning.

(?: ... ) is in Perl non-capturing grouping

>From perlre(1)

  "(?:pattern)"
  "(?imsx-imsx:pattern)"
       This is for clustering, not capturing; it groups subexpressions
       like "()", but doesn't make backreferences as "()" does.

So it is not a bug, and it definitely should match... unless implicit
variable $_ (the default input and pattern-searching space) got
mangled.  It would be better to use explicit form:

   $variable =~ /pattern/

-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]