[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36251: Regex library doesn't recognize ']' in a character class
From: |
tomas |
Subject: |
bug#36251: Regex library doesn't recognize ']' in a character class |
Date: |
Tue, 18 Jun 2019 13:20:07 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Jun 18, 2019 at 07:08:06AM -0400, Mark H Weaver wrote:
> Hi,
>
> Abdulrahman Semrie <address@hidden> writes:
>
> > I am using the pattern [\\[\\]a-zA-Z]+ to match a string with left or
> > right bracket in it [...]
> It turns out that there are several flavors of regular expressions in
> common use, with different features and syntax. The link you provided
> is using PCRE (PHP) regular expressions (see the "flavor" pane on the
> left), and there are three other supported flavors on that web site.
>
> Guile's (ice-9 regex) module provides a simpler flavor of regexps known
> as "POSIX extended regular expressions" [...]
D'oh! I forgot about Perl compatible regexps. In those, you /can/ escape
things with a backslash whithin [...]. This would have explained Abdulrhaman's
confusion better.
Thanks, Mark
-- t
signature.asc
Description: Digital signature