On Wed, Jun 17, 2026 at 03:58:25PM +0200, Christoph Martin wrote: > Package: devscripts > Version: 2.26.7~bpo13+1 > Severity: normal > > if a debian/watch file contains parentheses for grouping in the > regex, uscan misinterpretes these parentheses for additional matches > for the upstream version number which results in wrong $newversion > value. > > An example can be found in the cfengine3 package where the following > pattern should select only the minor versions which are devisible by > three: > > (\d+\.([0369]|[147][0369]*([147][0369]*[258][0369]*)*([147][0369]*[147]|[258])|[258][0369]*([258][0369]*[147][0369]*)*([258][0369]*[258]|[147]))+\.\d+) > > uscan outputs the following version: > > $newversion = 3.27.1.27....7 > > instead of > > $newversion = 3.27.1
Hi, Seems that nested capturing groups are confusing uscan, I think it expects a single capturing group with the version. I am not an expert in advanced perl regex, but seems that making inner groups non-capturing helps here, Matching-Pattern: .*/(\d+\.(?:[0369]|[147][0369]*(?:[147][0369]*[258][0369]*)*(?:[147][0369]*[147]|[258])|[258][0369]*(?:[258][0369]*[147][0369]*)*(?:[258][0369]*[258]|[147]))+\.\d+)@ARCHIVE_EXT@ Just a blind guess, use with care. Hope it helps, -- Agustin

