REGEXP support for all systems
Testing, NormalPublic


In OpenPGP format, "Regular Expression" support in trust signature packages is defined (RFC4880,, page 31, and section 8, page 61).

Our implementation of GnuPG just uses regcomp and regexec if system library offers the regexp support. But, here we have interoperability issue; It is not available on Windows. There are corner cases for system's regcomp/regexec. Interoperability issue for trusted signature is considered bad.

And sanitize_regexp routine should be revised/removed, too.

gniibe created this task.Feb 12 2020, 2:27 AM

RFC4880 (and older version of RFC2440) referes Henry Spenser's REGEXP. There are three implementations:

My opinion of selecting one is: The one in Jim Tcl (jimregexp.[ch] and utf8.[ch]), which is based on the regexp.old is good.
The reason is:
(1) functionality: It could be considered the RFC referred the regexp.old. Yet, it supports UTF-8.
(2) dependency: It is composed only by four files and less dependency.
(3) maintenance: It is maintained under Jim Tcl.

Created gniibe/regexp branch.

gniibe triaged this task as Normal priority.Feb 12 2020, 4:52 AM
gniibe changed the task status from Open to Testing.Apr 3 2020, 8:50 AM
gniibe added a project: Testing.

Pushed the changes.