Regular Expression for fnmatch function

Discussion in 'C Programming' started by Graeme Downes, Jan 14, 2005.

  1. Hi

    I'm trying to create a regular expression for C using the fnmatch
    function from the fnmatch.h library.

    I dont know if you can help, but i need something as follows:

    [[#:]#:]#

    where # represents any number with any number of digits

    it should be able to accept:

    "10:30"
    "10"
    "10:30:20"
    ""

    thanks for any help
    Graeme Downes, Jan 14, 2005
    #1
    1. Advertising

  2. (Graeme Downes) writes:
    > I'm trying to create a regular expression for C using the fnmatch
    > function from the fnmatch.h library.


    The fnmatch.h library is not part of standard C, nor is any regular
    expression library, so we can't help you here. You might try
    comp.unix.programmer.

    <OT>
    fnmatch doesn't do regular expressions; it probably can't do what you
    want. The folks in comp.unix.programmer can probably help you find
    something that can.
    </OT>

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Jan 14, 2005
    #2
    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. VSK
    Replies:
    2
    Views:
    2,272
  2. kepioo
    Replies:
    2
    Views:
    380
    kepioo
    Apr 9, 2006
  3. Replies:
    2
    Views:
    343
    Fredrik Lundh
    Jun 5, 2006
  4. abcd
    Replies:
    4
    Views:
    449
    Gabriel Genellina
    Jan 8, 2007
  5. kitty

    fnmatch.h help

    kitty, Mar 28, 2006, in forum: C++
    Replies:
    2
    Views:
    465
    kitty
    Mar 29, 2006
Loading...

Share This Page