On Tue, 10 Jun 2003, alex p wrote:
All,
I am really bad at REGEX's and am in need of help!
I have a script that asks for users input but I need to check that the input
begin with MDS(and a number 0-9) before proceeding
below is something like what I am doing:
print ask for input;
chomp
All,
I am really bad at REGEX's and am in need of help!
I have a script that asks for users input but I need to check that the input
begin with MDS(and a number 0-9) before proceeding
below is something like what I am doing:
print ask for input;
chomp ($answer=STDIN);
#(not sure which one to use
how about something like:
unless ($answer =~ /^MDS\d/)
{
print Try again: ;
}
MA
__
Post your free ad now! http://personals.yahoo.ca
___
Perl-Win32-Users mailing list
PROTECTED]
Sent: Tuesday, June 10, 2003 3:17 PM
Subject: easy newbie REGEX
All,
I am really bad at REGEX's and am in need of help!
I have a script that asks for users input but I need to check that the
input
begin with MDS(and a number 0-9) before proceeding
below is something like what I
It worked\n;}
}
/code
From: Trevor Joerges \[SendMIME Software\] [EMAIL PROTECTED]
To: alex p [EMAIL PROTECTED],
[EMAIL PROTECTED]
Subject: Re: easy newbie REGEX
Date: Tue, 10 Jun 2003 15:57:52 -0400
You could do something like this:
my $answer;
do {
print Question: ;
chomp ( $answer