"Joseph P. Discenza" wrote:

> Rhonald Lua wrote, on Tuesday, May 23, 2000 04:24
> : How does one use '$' to get the pattern at the end of string?
> : For example, I want to remove '&' at the end of 'hello&'.  PERL docs
> : indicate I could write:
> :     s/$(\&)//;
> : but doesn't seem to work.
>
> $ means end-of-line in regex (simplified: see perldoc perlre).
> Don't expect to find anything after $ in a regex.
>
> Also, & is not a metacharacter in a regex so does not need to
>

Quick clarification... The '$' dollar sign only has this special meaning at the
end of a regex.  Anywhere else, other then the last character in a pattern, is a
different meaning.  Of course, you'll probably still have to '\' escape it
because Perl may attempt variable interp.



---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to