- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Stupid Regex questions..
- From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
- Date: Wed Jul 12 09:42:18 2000
- Organization: Core
Scott Howard <scott@xxxxxxxxxx> wrote:
>>
>> :1,$s/$ord/$ord->/g
>>
>> A $ is only interpreted as a line end if
>> it is the last char in the pattern.
> Except that in Perl the $ord would normally be interpreted as the variable
> $ord, and thus the $ needs to be quoted (or some other quoting would be
> required).
But in the scope of a regex, the first $ can not be interpreted as the prefix
of a variable. The second may be but only if you use s///e.
--
Debian GNU/Linux 2.1 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt