bug-global
[Top][All Lists]
Advanced

[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





reply via email to

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