emacs-devel
[Top][All Lists]
Advanced

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

Re: Is there any way to have a string literal that is read "raw"


From: David Kastrup
Subject: Re: Is there any way to have a string literal that is read "raw"
Date: Sat, 09 Jul 2005 18:49:20 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Lennart Borgman <address@hidden> writes:

> David Kastrup wrote:
>
>>Markus Gritsch <address@hidden> writes:
>>
>>  
>>
>>>As Sean pointed out, it would also be convenient in such cases like
>>>Regexps handling.
>>>
>>>Python for example has beside of the normal string also a notation for
>>>a raw string:
>>>
>>>   regex = r'^.*\n'
>>>    
>>>
>>
>>Which still needs a delimiter, and you used \n which is _not_ regexp
>>syntax.  Now
>>
>>     regex = 4H^.*
>>     
>>
>>(notice the literal newline) would be retro-chic.
>>  
> You still need escaping, or course, but only for the delimeter.

No.  There is no escaping whatsoever, nor is there a delimiter.  The 4
before the H is a character count.  And H stands for "Hollerith code",
the punch card predecessor of "ASCII code".

Looks like you are not oldtimer enough to belong to the
retro-chiqueria.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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