[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
htags regex error
From: |
Rui Lopes |
Subject: |
htags regex error |
Date: |
Mon, 20 Oct 2003 13:48:01 +0100 |
Hi!
I was using the previous version of Global and I got bitten by the error
fixed in Revision 1.164:
http://savannah.gnu.org/cgi-bin/cvsweb/global/htags/htags.in.diff?r1=1.163&r2=1.164
but a better solution isn't:
$s =~ s/^(\Q$name\E)/<A HREF=$srcdir\/$html#$lno>$1<\/A>/;
or even:
$name = quotemeta($name);
instead of:
$name =~ s/([^\w])/\\\1/g; ?
I known that quotemeta or \Q do the same thing, but why not using it
instead of an explicit regex?
We shouldn't also escape html chars in $name?
Regards,
Rui Lopes
- htags regex error,
Rui Lopes <=