9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: hugo rivera <uair00@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] regexp doubt
Date: Tue, 13 Jul 2010 17:46:41 +0200	[thread overview]
Message-ID: <AANLkTimHm0T2obR3mJLrOJEae_kDD9Cppan9SapsZ1na@mail.gmail.com> (raw)
In-Reply-To: <88f2fccf6f0ecb1a3924f8d37b52abf8@bellsouth.net>

maybe I'm using a buggy version of acme, because /stat[abc]?[- ;]/
also fails with a "malformed" error. And according to the regexp(7)
man page, you should be able to precede a '-' with a backslash.


2010/7/13  <blstuart@bellsouth.net>:
>> both of them yield a
>>
>> regexp: malformed `[]'
>>
>> error.
>> I forgot to mention and I had an alternative solution from the
>> beginning /stat[abc]?([ ;]|-)/
>> I'm just wondering the reason the original version failed.
>
> As I recall, if you're going to include a hyphen in a character
> class, it has to be the first character so that it isn't taken to
> indicate a range.
>
> BLS
>
>
>

--
Hugo



  reply	other threads:[~2010-07-13 15:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 14:56 hugo rivera
2010-07-13 15:01 ` Vinu Rajashekhar
2010-07-13 15:11   ` hugo rivera
2010-07-13 15:15   ` Rodolfo (kix)
2010-07-13 15:31     ` hugo rivera
2010-07-13 15:37       ` blstuart
2010-07-13 15:46         ` hugo rivera [this message]
2010-07-13 15:50         ` Ethan Grammatikidis
2010-07-13 15:18 ` erik quanstrom
2010-07-13 15:31   ` hugo rivera
2010-07-13 16:00     ` erik quanstrom
2010-07-13 18:38       ` Russ Cox
2010-07-13 18:46         ` blstuart
2010-07-14  7:47           ` hugo rivera
2010-07-13 18:47         ` erik quanstrom
2010-07-13 18:49         ` erik quanstrom
2010-07-13 18:57         ` erik quanstrom
2010-07-14 18:11           ` Russ Cox
2010-07-15  8:15             ` hugo rivera
2010-07-13 15:48 ` yy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimHm0T2obR3mJLrOJEae_kDD9Cppan9SapsZ1na@mail.gmail.com \
    --to=uair00@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).