Thread Probleme mit RegEx und Worttypen
(49 answers)
Opened by Dingels at 2008-07-25 19:00
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, $/; } } } } me and my writeups
|