I can't do regular expressions...

Discussion in 'ASP .Net' started by riversmithco@hotmail.com, Feb 9, 2005.

  1. Guest

    I need some help on a regular expression if any has the skill.

    I need to specify a string in which there can be any number of numbers
    followed by a character in the range (d, h, or s)

    Exmple:

    123d


    Thanks
     
    , Feb 9, 2005
    #1
    1. Advertising

  2. Tod Birdsall Guest

    Hi,

    The following regular expression should work:

    ^\d+[dhs]$

    I recommend checking out http://RegExLib.com for an extensive list of
    regular expressions and a very helpful regular expression cheat sheet.

    Hope this helps.

    Tod Birdsall, MCP
    http://tod1d.blogspot.com
     
    Tod Birdsall, Feb 9, 2005
    #2
    1. Advertising

  3. You're gonna love this. It's a freeware visual utility that helps you build
    regular expressions:

    http://www.weitz.de/regex-coach/

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    <> wrote in message
    news:...
    >I need some help on a regular expression if any has the skill.
    >
    > I need to specify a string in which there can be any number of numbers
    > followed by a character in the range (d, h, or s)
    >
    > Exmple:
    >
    > 123d
    >
    >
    > Thanks
    >
     
    Kevin Spencer, Feb 9, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay Douglas
    Replies:
    0
    Views:
    635
    Jay Douglas
    Aug 15, 2003
  2. Gabriel Genellina
    Replies:
    2
    Views:
    273
    Miles
    Sep 25, 2007
  3. Replies:
    2
    Views:
    83
    Florian Gilcher
    Jul 29, 2008
  4. Ted Byers
    Replies:
    1
    Views:
    83
  5. Noman Shapiro
    Replies:
    0
    Views:
    254
    Noman Shapiro
    Jul 17, 2013
Loading...

Share This Page