ThomasDickey / original-mawk

bug-reports for mawk (originally on GoogleCode)
http://invisible-island.net/mawk/mawk.html
18 stars 2 forks source link

Print line with leading whitespaces - mawk can't handle (E)RE correctly #67

Closed apt4user closed 1 year ago

apt4user commented 2 years ago

Version: mawk 1.3.4 20200120 Hi, mawk can't handle the following expressions:

echo " (4 x space) testtest" | awk '/^[[:space:]]{4}/ {print}' => prints nothing

echo " (4 x space) testtest" | awk '/^[\t]{4}/ {print}' => prints nothing

echo " (4 x space) testtest" | awk '/^[ \t]{4}/ {print}' => prints nothing

Greetings

ThomasDickey commented 1 year ago

This works for current versions of mawk.