Package: mawk
Version: 1.3.4.20240905-1
Severity: normal
X-Debbugs-Cc: uklei...@debian.org

Hello,

following up on a thread in #debian-devel:

mawk(1) claims to support the same regex syntax as grep -E, however the
behaviour of regexes involving {n,m} is different/strange.

        $ printf '%s\n' 'x' 'xxx' 'xx' 'xxxx'| mawk '/^x{2,3}$/'
        xx

        $ printf '%s\n' 'x' 'xxx' 'xx' 'xxxx'| grep -E '^x{2,3}$'
        xxx
        xx

I would have expected that the output of both commands is identical (and
includes "xxx" as grep does).

Best regards
Uwe

-- System Information:
Debian Release: trixie/sid
  APT prefers testing-debug
  APT policy: (750, 'testing-debug'), (750, 'testing'), (700, 
'stable-updates'), (700, 'stable-security'), (700, 'stable-debug'), (700, 
'stable'), (600, 'unstable'), (500, 'unstable-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf

Kernel: Linux 6.10.9-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mawk depends on:
ii  libc6  2.40-2

mawk recommends no packages.

mawk suggests no packages.

-- no debconf information

Reply via email to