bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] (regex) nested complemented character class list


From: Aaron S. Hawley
Subject: [bug-gawk] (regex) nested complemented character class list
Date: Fri, 28 Mar 2003 00:46:00 -0500 (EST)

known regex bug(s)?

%> gawk --version
GNU Awk 3.1.2

%> echo 'foobar' | gawk '{ sub( /[[^a]r]*$/, ""); print; }'
foob

%> echo 'foobar' | gawk '{ sub( /[r[^a]]*$/, ""); print; }'
fooba

%> echo 'foobarr' | gawk '{ sub(/[r[^a]]*$/, ""); print; }'
foobar

inspired by the following:

%> echo 'foo://food/)' | gawk '{ sub( /[[^/][:punct:]]*$/, ""); print; }'
foo://food/)

%> echo 'foo://food/)' | gawk '{ sub( /[[:punct:][^/]]*$/, ""); print; }'
foo://food/

%> echo 'http://food/);' | gawk '{ sub(/[[:punct:][^/]]*$/, ""); print; }'
http://food/)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]