Thread Gespeicherter Regex und Umlaute (21 answers)
Opened by bianca at 2009-12-25 14:41

bianca
 2009-12-25 15:49
#129676 #129676
User since
2009-09-13
7016 Artikel
BenutzerIn

user image
Da kommt gerade irgendwie nicht raus, was ich möchte und eine Fehlermeldung dazu:

Code (perl): (dl )
1
2
3
4
my $regex_notiz = decode("UTF-8",'[^a-z!/()=?_üäöß:.,\-+ \d$%]');
my $text = decode("UTF-8",'!"§$%&/()=?_und überhaupt:;,GROßÖÄÜß.+und ziffern 0123456789-und kleinöäüß%$');
$text =~ s/$regex_notiz//ig;
print "neu: >$text<\n";


Code: (dl )
1
2
3
4
5
6
7
8
9
10
Wide character in print at regex.pl line 15 (#1)
(W utf8) Perl met a wide character (>255) when it wasn't expecting
one. This warning is by default on for I/O (like print). The easiest
way to quiet this warning is simply to add the :utf8 layer to the
output, e.g. binmode STDOUT, ':utf8'. Another way to turn off the
warning is to add no warnings 'utf8'; but that is often closer to
cheating. In general, you are supposed to explicitly mark the
filehandle with an encoding, see open and perlfunc/binmode.

neu: >!´┐¢$%/()=?_und ´┐¢berhaupt:,GRO´┐¢´┐¢´┐¢´┐¢´┐¢.+und ziffern 0123456789-und klein´┐¢´┐¢´┐¢´┐¢%$<
10 print "Hallo"
20 goto 10

View full thread Gespeicherter Regex und Umlaute