From: erik quanstrom <quanstro@coraid.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] regular expressions in plan9 different from the ones in unix? (at least linux)
Date: Fri, 23 Feb 2007 07:12:28 -0500 [thread overview]
Message-ID: <5c6781672fed7121e49771b8c80d0c8c@coraid.com> (raw)
In-Reply-To: <599f06db0702230319k5f785b80lced2cceb04e8c1cd@mail.gmail.com>
utf-8 encoding will "just work" (unless the gnu folk are
rearranging characters with the bucky bit set) or if
the result depends on knowing the width of a character,
e.g. in
a) a character class
b) matching a single character with ".".
for example for a file "fu" with these lines
α0
β0
α1
(no leading tab) i get these results with no
local settings at all.
; grep δ fu
δ0
works because as far as grep is concerned, the string
i asked for 03 b4 is in there. this works, too
; egrep '(ε|δ)0' fu
ε0
δ0
and this works because there is a character before
"0" on the line:
; egrep '.0' fu
ε0
δ0
but this doesn't
; egrep '[αβ]0' fu
; egrep '^.0' fu
this is for gnu grep version
; egrep --version
egrep (GNU grep) 2.5.1
- erik
next prev parent reply other threads:[~2007-02-23 12:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-22 22:16 Folkert van Heusden
2007-02-22 23:17 ` Alberto Cortés
2007-02-22 23:21 ` William Josephson
2007-02-22 23:48 ` Russ Cox
2007-02-23 6:27 ` Composition of regexps (Was re: [9fans] regular expressions in plan9 different from the ones in unix?) Joel Salomon
2007-02-23 6:54 ` William K. Josephson
2007-02-23 13:34 ` Joel C. Salomon
2007-02-23 17:33 ` Russ Cox
2007-02-23 11:19 ` [9fans] regular expressions in plan9 different from the ones in unix? (at least linux) Gorka Guardiola
2007-02-23 12:12 ` erik quanstrom [this message]
2007-02-23 12:17 ` Gorka Guardiola
2007-02-23 13:02 ` erik quanstrom
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=5c6781672fed7121e49771b8c80d0c8c@coraid.com \
--to=quanstro@coraid.com \
--cc=9fans@cse.psu.edu \
/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).