bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] problem with 'match'


From: Guy Léonis
Subject: [bug-gawk] problem with 'match'
Date: Tue, 17 May 2011 11:00:57 +0000

Dear awk management team,

I have create on top of gawk a tool to extract tags and links from HTML files.
With gawk V3.1.1 from RHEL V3.0 WS (32b), the tool is perfect.
With gawk V3.1.8 from Fedora Core 14 (64b), the tools exhibits problems.
Here is a simple instance to create the problem: 

awk 3.1.1:
./awk '{printf "%d\n", match($0, "<[ ]*[aA][ ]+[hH][rR][eE][fF]")}' test.txt
gives 209, the expected result

awk 3.1.8:
/bin/awk '{printf "%d\n", match($0, "<[ ]*[aA][ ]+[hH][rR][eE][fF]")}' test.txt
gives 1, an erroneous value

Please note that line selection with the same regular expression works properly 
with both awk versions.

I hope it helps. Best regards,

Guy Léonis 




Spacebel                    Tel   : +32-26 58 20 27 
I. Vandammestraat 7 bus 1   Fax   : +32-26 58 20 90 
B-1560 Hoeilaart            email : address@hidden 
BELGIUM
 

Attachment: test.txt
Description: test.txt

Attachment: cmd.txt
Description: cmd.txt


reply via email to

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