On Mon, Oct 13, 2008 at 2:49 PM, <[EMAIL PROTECTED]> wrote:

>
> Hi All,
>
>
>
> I have a string and I need to parse that string to check whether it is
> in required format or not. I have a Perl script which ask for user
> input. I have mentioned in the Perl script that input should be in the
> following format.
>
>
>
> For example:-  1,2,3 OR 1 2 3
>
>
>
> Which means that delimiter between these figures should be comma OR
> space. No any other character. I need all users to adhere that and if
> they not then they should exit.
>
>
>
> Can somebody please give me reg. exp. which can be used to parse the
> string and check whether comma OR space is there or not as a delimiter
> and it should contain only numeric not alphabets.
>
>
>
> Please suggest.
>
>
>
> Regards,
>
> Irf
>
>
>
>
>
>
>
>
>
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information.
> If you are not the intended recipient, please contact the sender by reply
> e-mail and destroy all copies of the original message.
> Any unauthorised review, use, disclosure, dissemination, forwarding,
> printing or copying of this email or any action taken in reliance on this
> e-mail is strictly
> prohibited and may be unlawful.


Hi Ifran,

I do not want to sound to rude but...
Going thru my mailbox I found some 100+ similair requests where you have not
shown any atempt your self and keep on asking the list for very basic
things. I know this is a beginners mailing list but this is not a "help me
keep my job" or "please do my homework" mailing list.

A regular expression that filters for this is a very simple thing to write
and with even a little effort you can figure out how this is done, looking
at: 
http://perldoc.perl.org/perlre.html<http://perldoc.perl.org/perlre.html&usg=AFQjCNE_qhENrOzthlwC54MYYZmlJNV_Dw>
for
instance will already explain this.

With you working for a big IT company and appearently tasked to write perl
code you should start to work out these things for your self. Sooner or
later a colleague is going to look at this mailing list or even worse a
customer. Or maybe the mailing regulars will notice you are using their time
and skill for nothing more then to prevent having to think for your self,
and they will refuse to anwser.

Regards,

Rob

Reply via email to