Thread Vokale im Umlaute wandeln
(20 answers)
Opened by Tom950 at 2014-03-18 06:48 2014-03-18T20:58:04 Tom950 Nur so bzgl. Perl lernen: Für das, was Du da machst gibt es sog. lookarounds, dann braucht keine Gruppe eingefangen und $1 nicht verwendet werden: Code (perl): (dl
)
1 2 3 4 $text =~ s/ae(?!u)/ä/g; # negativer lookahead $text =~ s/A[eE](?![uU])/Ä/g; $text =~ s/(?<![ae])ue/ü/g; # negativer lookbehind $text =~ s/(?<![ae])U[eE]/Ü/g; usw, eine ausführliche Anleitung gibt's z.B. hier. Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan: "The Elements of Programming Style"
|