[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Does gawk manual mention how an empty regex should be handled?
From: |
Arkadiusz Drabczyk |
Subject: |
Does gawk manual mention how an empty regex should be handled? |
Date: |
Wed, 31 Mar 2021 18:25:39 +0200 |
TIL that empty regex matches any string:
$ awk 'BEGIN { print "abc" ~ "" }'
1
$ awk 'BEGIN { print "abc" ~ // }'
1
It can also be reproduced with mawk, Busybox awk and FreeBSD
awk. However, I wasn't able to find an explanation of that behavior in
the gawk manual. Is it actually documented somewhere?
--
Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
- Does gawk manual mention how an empty regex should be handled?,
Arkadiusz Drabczyk <=