RE: CHeck for valid numbers

2003-02-04 Thread Kipp, James
> > are you just trying to match 2 digits in the substr? > Try if ($newyr =~ /( \d{2} )/) get rid of the spaces, it was just for clarity. or use /x to ignore the spaces -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: CHeck for valid numbers

2003-02-04 Thread Kipp, James
> 02chevy > 02 chevy > 2chevy > chevy > > my regex is as follows but does not work- > > $newyr = substr($yr[0],0,2); > > if ($newyr =~ /([0-9])/) { > It is not catching the second number correctly. > are you just trying to match 2 digits in the substr? Try if ($newyr =~ /( \d{2} )/) --

RE: CHeck for valid numbers

2003-02-04 Thread wiggins
On Tue, 4 Feb 2003 14:36:01 -0500 , Ned Cunningham <[EMAIL PROTECTED]> wrote: > Hi all, > > I am trying to check for a valid year in a field. > > The data is : > > 02chevy > 02 chevy > 2chevy > chevy > > my regex is as follows but does not work