scsh-users
[Top] [All Lists]

Re: beginning of word (bow) in regular expressions

To: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
Subject: Re: beginning of word (bow) in regular expressions
From: mmc@maruska.dyndns.org (Michal Maruška)
Date: 14 Mar 2002 18:28:47 +0100
Cc: scsh@zurich.ai.mit.edu
sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr.  Preprocessor]) 
writes:

> >>>>> "Ed" == Ed Kademan <kademan@phz.com> writes:
> 
> Ed> The regular expression subsystem seems to have forgotten what `bow' means.
> 
> Yep.  Conceptually, this is because BOW/EOW and WORD/WORD+ are not precisely
> defined, as their meaning is locale-dependent.  Chances are they don't do what
> you want and you're better off writing an explicit character class.


> Technically, this is because we replaced scsh's old, hacked-up version of 
> Henry
> Spencer's regexp package by the operating system's POSIX package.  We didn't 
> see
> the problem on the platform we usually build on (FreeBSD), as FreeBSD uses
> Spencer's implementation as well.

you mean    (i use linux/glibc 2.2.3; regexps are in glibc, right?)
that this is not going to work either (for the same reason):

(regexp-substitute/global
     #f (posix-string->regexp "\\<we") "Here we go."
     'pre "you" 'post)

Yes, it does not work (here).

<Prev in Thread] Current Thread [Next in Thread>