Re: Special characters in patterns: what about \?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Special characters in patterns: what about \?
- From: Philippe Lhoste <PhiLho@...>
- Date: 2007年6月27日 17:38:13 +0200
On 27/06/2007 17:14, Mauro Iazzi wrote:
The backslash is still considered escape at string constructor level.
It is discarded before it arrives to gsub. Then gsub does not even
know it was there and interprets the ^ as negating next char (it needs
at least one). Anytime you want a backslash in a string just insert it
twice.
Or just use literal strings, they are great for such use (and for
Windows paths!)
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --