Thread regex max ein "-" (12 answers)
Opened by Gast at 2007-07-01 15:37

MisterL
 2007-07-01 16:02
#78105 #78105
User since
2006-07-05
334 Artikel
BenutzerIn
[default_avatar]
Stimmt :)
Aber rein gefühlsmässig scheint die Variante mit konkreten Suchparametern schneller zu sein als ohne. Zum Probieren:
Code: (dl )
1
2
3
4
5
6
7
8
#!/usr/bin/perl
use strict;
use warnings;
my $string ="MisterL - ein ganz schlechter Perlprogrammier";
#if($string =~ /-{1,1}/) {
if($string =~ /-/) {
print("MisterL ist wirklich ein ganz schlechter Perlprogrammierer");
}
“Perl is the only language that looks the same before and after RSA encryption.”

View full thread regex max ein "-"