From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5c6781672fed7121e49771b8c80d0c8c@coraid.com> From: erik quanstrom Date: Fri, 23 Feb 2007 07:12:28 -0500 To: 9fans@cse.psu.edu Subject: Re: [9fans] regular expressions in plan9 different from the ones in unix? (at least linux) In-Reply-To: <599f06db0702230319k5f785b80lced2cceb04e8c1cd@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 1339bf82-ead2-11e9-9d60-3106f5b1d025 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 =CE=B10 =CE=B20 =CE=B11 (no leading tab) i get these results with no local settings at all. ; grep =CE=B4 fu =CE=B40 works because as far as grep is concerned, the string i asked for 03 b4 is in there. this works, too ; egrep '(=CE=B5|=CE=B4)0' fu =CE=B50 =CE=B40 and this works because there is a character before "0" on the line: ; egrep '.0' fu =CE=B50 =CE=B40 but this doesn't ; egrep '[=CE=B1=CE=B2]0' fu ; egrep '^.0' fu this is for gnu grep version ; egrep --version egrep (GNU grep) 2.5.1 - erik