Thread alle wörter matchen (2 answers)
Opened by Froschpopo at 2006-03-07 01:17

renee
 2006-03-07 09:30
#63523 #63523
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

use strict;
use warnings;


for('hallo K','hallo Karl'){
if($_ =~ /^(?:\s*\b([a-zA-Z0-9]{2,50})\b\s*)+$/){
print "$_: yes\n";
}
else{
print "$_: no\n";
}
}

Code: (dl )
1
2
3
~ 5> perl community.pl 
hallo K: no
hallo Karl: yes
\n\n

<!--EDIT|renee|1141716793-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread alle wörter matchen