[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Infinite loop in sub/gsub
From: |
jhart |
Subject: |
Infinite loop in sub/gsub |
Date: |
Sun, 6 Oct 2002 08:36:54 -0400 |
This command line:
echo "''Italics with an apostrophe'' embedded''"|gawk -f test.awk
where test.awk contains this instruction:
/''/ { sub(/''(.?[^']+)*''/, "<em>&</em>"); }
puts gawk 3.11 into an infinite loop. Whereas, this command works:
echo "''Italics with an apostrophe' embedded''"|gawk -f test.awk
Platform: Mac OS X 10.1.5/Darwin Kernel Version 5.5: Thu May 30 14:51:26
PDT 2002; root:xnu/xnu-201.42.3.obj~1/RELEASE_PPC
- Infinite loop in sub/gsub,
jhart <=