genlink: properly escape regexp special characters
Fixes compatibility with mawk, as used on debian and ubuntu now.
This commit is contained in:
parent
18e15c133d
commit
0cb1db0967
@ -31,9 +31,9 @@ BEGIN {
|
|||||||
gsub(/\r$/,"");
|
gsub(/\r$/,"");
|
||||||
|
|
||||||
tmp = "^"$1"$";
|
tmp = "^"$1"$";
|
||||||
gsub(/?/, ".", tmp);
|
gsub(/\?/, ".", tmp);
|
||||||
gsub(/*/, ".*", tmp);
|
gsub(/\*/, ".*", tmp);
|
||||||
gsub(/+/, ".+", tmp);
|
gsub(/\+/, ".+", tmp);
|
||||||
tolower(tmp);
|
tolower(tmp);
|
||||||
|
|
||||||
if (PAT ~ tmp) {
|
if (PAT ~ tmp) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user