[devscripts] 01/01: licensecheck: tweaked to parse Artistic 2.0 license file

Osamu Aoki osamu at debian.org
Sun Dec 20 14:48:40 UTC 2015


On Sat, Dec 19, 2015 at 05:45:55PM +0000, dod at debian.org 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



More information about the devscripts-devel mailing list