Oops.  That was my typo originally.  The + must be escaped within a regex.
So if you were going to do it that way, you should replace (+|-) with
(\+|-).

But the method you used with the character class below is easier to read, so
if it was me I'd go with that one.

-----Original Message-----
From: Donnie Jones
To: John W. Krahn
Cc: [EMAIL PROTECTED]
Sent: 6/30/02 4:50 PM
Subject: Re: Check for integer -- More problems.

> 
> > ###########################################################
> > # Here's my code for this instance
> > #
> >  if( $insert_field[$i] =~ /^(+|-)?\d+$/ )  ### Line 161
> >         {
> >         $sql .= qq{
> >                 $insert_field[$i]
> >                 };
> 

I found what it should have been:  

############################################
if( $insert_field[$i] =~ /^[+-]?\d+$/ )
############################################

Thanks for the help.

--Donnie

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

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

Reply via email to