[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [LOCALE] regulære udtryk



On Sat, Sep 02, 2000 at 15:47:07 +0200, Keld Jørn Simonsen wrote:
> On Fri, Sep 01, 2000 at 10:15:43AM +0200, Byrial Jensen wrote:
> > Kun små bogstaver, tak.
> > 
> > For det første: Det andet ville kunne skabe ubehagelige overraskelser
> > da man (læs: jeg) ikke venter at sådanne udtryk er locale-afhængige.
> 
> Er det fordi det ikke skal være locale-afhængigt?
> Iflg POSIX standarden er det localeafhængigt.

Det var jeg ikke klar over. Jeg troede at [a-c] altid ville matche
yderpunkterne (a og c) samt de tegn hvis numeriske værdier ligger
imellem yderpunkternes numeriske værdier i det brugte tegnsæt (her
b og ikke andre).

> > For det andet: Det ville være temmeligt besværligt hvis det så blev
> > nødvendigt at skrive [abcdefghijklmnopqrstuvwxyz] for at matche et
> > lille bogstav mellem a og z.
> 
> Dertil har man [:lower:]

Nej, ikke hvis man kun ønsker at matche små bogstaver mellem a og z,
begge inkl., men ikke alle små bogstaver.

> > For det tredje: Hvis man ønsker at medtage de store bogstaver, kan bare
> > kalde regcomp(3) med REG_ICASE-flaget.
> 
> Det kan man vist ikke fra skallen.

grep(1) og tilsvarende programmer som tager regulære udtryk som
inddata har som regel altid en mulighed for at angive at
REG_ICASE-flaget skal bruges, typisk et "-i"-tilvalg på
kommandolinjen.

-- 
Byrial
http://home.worldonline.dk/~byrial/


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:52 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *