RE: Easy regex

2003-07-10 Thread Dan Muey
> HI all. Howdy > > I am trying to verify that a field has only numbers > > 12345 > 13456 > 34x34 The regex to check for that would be: m/^\d+$/ says match beginning with a digit, contain one or more digits, ending with a digit for(@nums) { s/\D/0/; } id substitutiing any non

Re: Easy regex

2003-07-10 Thread Rob Anderson
"Ned Cunningham" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > HI all. > > I am trying to verify that a field has only numbers > > 12345 > 13456 > 34x34 > > if it has non numbers I want to delete the non number with a zero? > > Snip > > $mil =~ s/[0-9]/$_/; > > this returns zero. >