Could you give some examples of legitimate filenames of all varieties you
want ?

that would help me \ us to make unambiguous test cases to ascertain your
regex and suggest improvements...

-aman.

-----Original Message-----
From: Javeed SAR [mailto:SAR.Javeed@;sisl.co.in]
Sent: Thursday, November 07, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: pattern



> Hi all,
> I want to input a string which is used to create file name, and I want to 
> allow input string to consist of letters(SDK) at the start and only IR and
> DEV inbetween, and numbers(0-9) and 
> underscore( _ ) within file name. 
> Is the pattern right. 
> m/^SDK[0-9]|^SDK_[0-9]|^SDK_[0-9]_IR|^SDK_[0-9]_IR_DEV$/ 
> 
> 
> if ($input =~ /what pattern /){ 
> create file 
> } else { 
> exit 0; } 
> 
> 
> 
> Regards 
> j@veed
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to