Hi,

On 9/29/26 7:44 PM, Guillem Jover wrote:

   Section → ^[[:alnum:][:digit:]-]+$
   Priority → ^[[:alpha:]-]+$

But re-reading that now, I should probably disallow starting and ending
'-'. And I'm not sure whether these are going to be too strong anyway (I
suspect someone might be using weird values for these… :/ ).

FWIW my parser[1] uses /[a-z0-9-]+/ and has no other complaints on any Packages or Sources file contained in the the current Release file.

I think /[a-z0-9]+(-[a-z0-9]+)*/ should also work, that also excludes two consecutive dashes, or even /[a-z][a-z0-9]*(-[a-z][a-z0-9]*)*/ to disallow leading digits.

Same for Priority, that can probably be limited to lowercase characters as well.

   Simon

[1] https://git.sr.ht/~sjr/elim-debian/tree/main/item/pkglist.l

Reply via email to