Re: easy newbie REGEX

2003-06-12 Thread Carl Jolley
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

easy newbie REGEX

2003-06-10 Thread alex p
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

Re: easy newbie REGEX

2003-06-10 Thread M Ajmal
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

Re: easy newbie REGEX

2003-06-10 Thread Trevor Joerges \[SendMIME Software\]
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

Re: easy newbie REGEX

2003-06-10 Thread alex p
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