Results 1 to 4 of 4

Thread: Money Expression

  1. #1

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Money Expression

    [$]*[0-9]*[.][0-9][0-9]

    That is the expression I am using now but it forces them to enter in $0.00 I want to allow just 0 or just 0.00 or just $0.

    I tried [$]*[0-9]*[.][0-9][0-9]|[0-9]*|[$]*[0-9]*

    but it isn't correct. I have tried several long expressions with no luck I always end up with either only one being accepted or none... I really wish this thing had a check setup to validate the expression before build and running the project....
    Magiaus

    If I helped give me some points.

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,705
    Go to the place below. You can select RegEx's, test them live, even replace the text with your own and retest it. It allows you see how they match in .Net, Javascript, and/or vbScript.

    http://www.regexlib.com/RETester.aspx?regexp_id=295

  3. #3

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    thanks
    Magiaus

    If I helped give me some points.

  4. #4

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    [$]*[0-9]*[.][0-9][0-9]|[0-9]*|[$]*[0-9]*|[0-9]*[.][0-9][0-9]

    it says will do the trick. I'm about to test it in my project
    Magiaus

    If I helped give me some points.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width