Thread Regex Vergleich und "use locale" (4 answers)
Opened by Raphael at 2015-11-26 14:45

bianca
 2015-11-27 11:58
#183065 #183065
User since
2009-09-13
6978 Artikel
BenutzerIn

user image
Guest Raphael
da ich mit Funktionen wie sort Umlaute korrekt sortieren möchte

Dafür benutze ich das hier:
Code (perl): (dl )
1
2
3
4
use Unicode::Collate;
my $alphasorter_modul = Unicode::Collate->new();
my $alphasorter_regex = qr{[^0-9 a-z!"§$%&/()=?\{\[\]\}\]><|_\-+*,.:;#'~\^]}ix;
my $alphasorter = sub { $_[0] =~ $alphasorter_regex || $_[1] =~ $alphasorter_regex ? $alphasorter_modul->cmp($_[0],$_[1]) : lc $_[0] cmp lc $_[1] };

Das hatten wir hier: Unicode::Collate -> sehr langsam?
10 print "Hallo"
20 goto 10

View full thread Regex Vergleich und "use locale"