[MacPorts] #45500: ctags @5.8_1: --regex- flags don't work with some regular expressions that work on Linux

MacPorts noreply at macports.org
Mon Jul 13 03:54:39 UTC 2026


#45500: ctags @5.8_1: --regex- flags don't work with some regular expressions that
work on Linux
-----------------------+--------------------------------
  Reporter:  mvgrimes  |      Owner:  macports-tickets@…
      Type:  defect    |     Status:  reopened
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.3.2
Resolution:            |   Keywords:
      Port:  ctags     |
-----------------------+--------------------------------

Comment (by ryandesign):

 Replying to [comment:9 saj]:
 > Yes, this is all documented in `re_format(7)`.  IMO, the original report
 is invalid.  `\w` and `\s` are not portable.  I always avoid them for that
 reason.
 >
 > `re_format(7)` does offer a `REG_ENHANCED` mode that might be another
 way forward if people really want `\w` and `\s`.  This would not require a
 new library dependency.  However:
 >
 > > these additional features may conflict with the IEEE Std 1003.2
 (“POSIX.2”) standards in some ways
 >
 > I don't think `REG_ENHANCED` should be built by default.  If built by
 default, it would be hard to interoperate with other people on different
 platforms.  (People often share development scripts with `ctags ...`
 argument vectors embedded within.)  May be suitable as a variant that is
 not built by default for users who do not care about portability.

 I had spent some time reading `re_format(7)` on Lion and it was not
 mentioned there. I figured I should not expect it to document features it
 does not implement. But now that I look on Sequoia, I agree it is
 mentioned there, where it additionally notes: "Use this with care in
 situations which require portability (including to past versions of the
 Mac OS X using the previous regex implementation)." `REG_ENHANCED` starts
 appearing in `re_format(7)` in Mountain Lion, so if we offer a variant for
 that, the variant would have to be marked incompatible with Lion and
 older.

-- 
Ticket URL: <https://trac.macports.org/ticket/45500#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list