$line =~ /[a-zA-Z]{2,8}/;
  
   
  
  ------------------ Original ------------------
  From:  "Daniel Burgaud"<[email protected]>;
 Date:  Mon, Nov 16, 2009 04:27 PM
 To:  "Perl-Win32-Users"<[email protected]>; 
 
 Subject:  Need help with RE:

  
Hi,

my $line = "Unconfirmed";

I need an RE that will give me a TRUE value if the string is 2~8 chars long.
otherwise, it gives FALSE;

I tried

if ($line =~ /\S{2,8}/) {
?? return 1;
} else {
?? return 0;
}

However this does not work.

I cannot use length($line) because it has to be Regular expression.

Thanks.

Dan
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to