Thread Regexp 32 Bit Limitierung (14 answers)
Opened by bloonix at 2006-10-20 15:52

bloonix
 2006-10-20 16:24
#71046 #71046
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Beispiel bei 3 Zeichen:

Code: (dl )
1
2
3
$text = 'text ist zu lang';
$text =~ s/^(.{3}).*$/$1/;
print $text, "\n";


tex

Ich möchte einen Text auf eine vorgegebene Länge kürzen.

@renee, wenn ich .* weglasse, wird der Text nicht gekürzt
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread Regexp 32 Bit Limitierung