linux-l: regexpr

Rene Dietze rene at endel-dietze.de
Sa Sep 8 00:31:15 CEST 2001


>>>>> "Ulrich" == Ulrich Wiederhold <U.Wiederhold at gmx.net> writes:

hallo ulrich.. 
hey wo gibts diese mukke ?
ich denke das sollte gehen..

$file = "(This Artist)_-_04 - It´s a better Live without winDows.mp3";
$file = lc($file);
$file =~ s/([\s\(_][a-z]{0,1})/uc($1)/ge;

gruss rene



    Ulrich> Hallo, * Ruwen Poljak <ruwen at rm-r.de> [010907 13:04]:
    >> das müßte in etwa so gehen:
    >> 
    >> $file = ucfirst lc($file);

    Ulrich> Leider nicht so einfach.  So funktioniert es jetzt:

    Ulrich> $file = lc($file); while ($file =~ s/_/ /) {} #converts
    Ulrich> underlines to spaces my @word = split(/\s+/, $file); $file
    Ulrich> = undef; foreach my $word (@word) { $word =
    Ulrich> ucfirst($word); $file = $file . " $word"; }

    Ulrich> Das erscheint mir aber noch sehr aufwendig. Hat nicht
    Ulrich> jemand noch ne Idee für ne regexpr? Vielleicht mit \u ?

    Ulrich> Gruß Uli

    Ulrich> -- 'The box said, 'Requires Windows 95 or better', so i
    Ulrich> installed Linux - TKK 5




Mehr Informationen über die Mailingliste linux-l