Re: float regex

2008-10-07 Thread Richard White
ok thanks tom will def do this thanks again for your help > On Tuesday 07 Oct 2008, Richard White wrote: > > i need it to validate the value based on the criteria: > > Err, right, so just return the result of rematch() ? You don't need > the actual > value itself. > Get a good regular expressi

Re: float regex

2008-10-07 Thread Tom Chiverton
On Tuesday 07 Oct 2008, Richard White wrote: > i need it to validate the value based on the criteria: Err, right, so just return the result of rematch() ? You don't need the actual value itself. Get a good regular expression editor - there are several online ones and I hear someone compiled kreg

Re: float regex

2008-10-07 Thread Richard White
> You mean once you've determined it's a valid string, you then want > that string > as a number ? > CF is typeless, so just use it as is. no, i mean i need to validate that the the value i pass in to that function is a valid float. e.g. 10.00 would pass but a2.00 would not pass: i need it to

Re: float regex

2008-10-07 Thread Tom Chiverton
On Tuesday 07 Oct 2008, Richard White wrote: > so i have changed it to the following but now it is throwing passing back a > value of 1, on the following regalar expression: > "^[\+|-]?[0-9][0-9]*(\.[0-9][0-9]*)$" You mean once you've determined it's a valid string, you then want that string as a

Re: float regex

2008-10-07 Thread Richard White
hi tom, i thought i needed to use the negative look ahead as otherwise it will pick up the first part that it does match but i want it to go through my entire value checking all values to see if they match, is this why it is getting stuck on 1? thanks > hi tom, yes thanks i didn't realise that

Re: float regex

2008-10-07 Thread Richard White
hi tom, yes thanks i didn't realise that!!! that is making it too complicated! so i have changed it to the following but now it is throwing passing back a value of 1, on the following regalar expression: "^[\+|-]?[0-9][0-9]*(\.[0-9][0-9]*)$" for the value 10.00 do you have any idea why it is d

Re: float regex

2008-10-07 Thread Tom Chiverton
On Tuesday 07 Oct 2008, Richard White wrote: > i have used negative lookahead This makes things very complicated. > isnt part of the regular expression, and therefore have the following code > to test for an error: Why not use a simpler reg exp with out the look ahead (such as /[+-]?[0-9] [0-9]

float regex

2008-10-07 Thread Richard White
hi i am trying to create my own isValidFloat function using a regalar expression but it isnt behaving how i would like and cannot work out what the problem is: this is my float regaular expression i have used negative lookahead so that it will return me any point that isnt part of the regula