[Top][All Lists]

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

Re: htags regex error

From: Shigio Yamaguchi
Subject: Re: htags regex error
Date: Mon, 20 Oct 2003 23:06:54 +0900

> 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?

Htags is written only by the function of perl4.
The \Q and \E are new function in perl5.
Of course, we can move to perl5 or perl6 but I should rather move to
C language for the performance and the extendibility in the future, I think.
Both gtags(1) and global(1) were also written in perl in a early version.

> We shouldn't also escape html chars in $name?

Are there any troubles? What should we do?
Shigio Yamaguchi <address@hidden> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

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