guile-devel
[Top][All Lists]
Advanced

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

Re: bug#12665: regexp fault for closing square bracket within character


From: Marijn
Subject: Re: bug#12665: regexp fault for closing square bracket within character class
Date: Thu, 18 Oct 2012 14:18:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120924 Thunderbird/15.0.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18-10-12 11:44, Panicz Maciej Godek wrote:
>> As documented in "Syntax of Regular Expressions" of the Emacs
>> manual (to which section 6.15 of the Guile manual refers):
>> 
>> To include a `]' in a character set, you must make it the first 
>> character.  For example, `[]a]' matches `]' or `a'.  To include
>> a `-', write `-' as the first or last character of the set, or
>> put it after a range.  Thus, `[]-]' matches both `]' and `-'.
> 
> OK, I see. I guess I got used to PCRE for too long :) Sorry for my
> mistake.

``Regular expressions crammed into string-syntax'' really needs to be
deprecated in Scheme implementations. SRE[1][2] is more expressive and
doesn't suffer from such exceptions.

Marijn

[1]:http://sjamaan.ath.cx/posts/lispy-dsl-sre.html
[2]:http://www.scsh.net/docu/post/sre.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlB/830ACgkQp/VmCx0OL2w8UACcCYQ6pBYs2cbBS2CrdlnkYmuY
5gcAnj6fDJfQRS2Rm+IwpaTSgaeN/Ev/
=EZq3
-----END PGP SIGNATURE-----



reply via email to

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