[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



Keld:

> Et spørgsmål, som diskuteres ivrigt i POSIX-kredse:
> 
> Hvis vi taler om det danske locale, bør
> det regulære udtryk [a-c] - indeholde også
> store bogstaver som B ?  a < b,B < c
> eller skal det kun indeholde  små bogstaver?

1) Det bør vel altid være muligt at vælge at bruge et
   specifikt locale (typisk en_US) i en given sammenhæng,
   men som udgangspunkt bør brugerens valg af locale
   accepteres af alle programmer.

2) Hvis man angiver et interval af små bogstaver bør der
   ikke pludselig være underforståede store bogstaver med.

3) Man skal bruge den for det valgte locale definerede
   sorteringsorden, _men_ der skal skelnes mellem store og
   små bogstaver (hvor det er relevant).

   Danske eksempler: [a-c] = [à-c] = ((a|à|á)|b|c)
                     [æ-å] = [ä-å] = ((æ|ä)|(ø|ö)|(å|aa))

   Forklaringer: A, à og á sorteres sammen og må derfor
                 regnes for ækvivalente.
                 Tilsvarende gælder for æ og ä, for ø og ö
                 og for å og aa.

Hvordan regner man med at håndtere tegn, der ikke er
omfattet af et givet locale?

Hvad vil vi gøre når folk blander store og små bogstaver
eller på anden måde går udenfor alfabetet?

Eksempler med problemer: [1-F], [a-A], [1-f], [A-å], [å-A],
                         [#-z], ...

Jacob
-- 
"There are only two types of data:
                         Data which has been backed up
                         Data which has not been lost - yet"



 
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] *