On Sat, Dec 19, 2015 at 05:45:55PM +0000, [email protected] wrote:
> dod pushed a commit to branch master in repository devscripts.
> 
> -    if ($licensetext =~ /(?:This is free software, licensed|Released) under 
> (?:the terms of )?[Tt]he Artistic License ([^ ]+)/) {
> +    if ($licensetext =~ /(?:^|(?:This is free software, licensed|Released) 
> under (?:the terms of )?)?[Tt]he Artistic License ([v\d.]+)/) {

Since the whole "(?:^|(?:This is ........... terms of )?)" is followed
with "?" making it completely optional, I do not see the reason to have
"^" and the other matching. 

Why not simply

> +    if ($licensetext =~ /[Tt]he Artistic License ([v\d.]+)/) {

If you require one of the matching, the whole "(?:^|(?:This is
........... terms of )?)" should not be followed by "?".

I am confused with this rule.

Osamu

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to