Thread Probleme mit RegEx und Worttypen (49 answers)
Opened by Dingels at 2008-07-25 19:00

LanX-
 2008-07-25 20:22
#112746 #112746
User since
2008-07-15
1000 Artikel
BenutzerIn

user image
um Linuxers Code ohne RegEx verständlicher zu machen

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
for my $word ( split /\s+/, $text ) {

    for my $pre ( keys %hash ) {

        for my $post ( keys %hash ) {
            #- Kleinschreibung
            my $lc_word="\L$word";
            my $lc_komposit="\L$pre$post";

            if ( $lc_word eq $lc_komposit ) {
                print $word, $/;
            }
        }
    }
}

View full thread Probleme mit RegEx und Worttypen