Yeah, I think that Greg has it right. Didn't notice the bit where it can't be a single dash but when I test the regex with a + instead of * it does not match single dash.
^[0-9\.-][0-9\.]+ Judah On Wed, Apr 20, 2011 at 10:58 AM, Greg Morphis <gmorp...@gmail.com> wrote: > > That "*" means 0 or more, could you change it to "+" meaning 1 or more? > Since there has to be a number? > Regex is not my strong suit either > > On Wed, Apr 20, 2011 at 12:21 PM, G Money <gm0n3...@gmail.com> wrote: >> >> Rats...it still allows just a single dash "-" >> >> On Wed, Apr 20, 2011 at 11:57 AM, Judah McAuley <ju...@wiredotter.com>wrote: >> >>> >>> Ok, here's what I've got so far before my meeting: >>> >>> ^[0-9\.-][0-9\.]* >>> >>> That says: start with a single character that is numeric, a period or >>> a negative, then followed by any number of characters that is numeric >>> or a period. >>> >>> This seems to completely match 0.34, -0.34, -.34, .34 but fail for >>> .3-4, Q34 etc. >>> >>> Judah >>> >>> On Wed, Apr 20, 2011 at 9:37 AM, G Money <gm0n3...@gmail.com> wrote: >>> > >>> > On Wed, Apr 20, 2011 at 11:35 AM, Judah McAuley <ju...@wiredotter.com >>> >wrote: >>> > >>> >> >>> >> Hmm...would you want to make sure that there is a number between the >>> >> dash and period? Would -.34 be valid? I'm trying to work on a regex >>> >> (not my strong suit) while I wake up. >>> >> >>> > >>> > No, we wouldn't need a number between them, since "negative thirty four >>> > one-hundreths" is a perfectly acceptable number. >>> > >>> > I appreciate your time Judah. >>> > >>> > >>> > >>> >>> >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:336567 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm