Thread: C version of regex?

  1. #1
    Registered User
    Join Date
    Oct 2008

    C version of regex?

    i'm having troubles figuring out a way to find ".doc" files in a given directory. I know c++ one can use regex and its delimiters to find all .txt files but what can be used to find .txt files in C?

  2. #2
    Registered User
    Join Date
    Oct 2008
    First compile the regexp w/ regcomp(); then use regexec() to compare each dir entry.
    See the manpages of regcomp() and regexec() for more information.

  3. #3
    Registered User
    Join Date
    Jul 2007
    On POSIX compatible systems, regex.h which was already mentioned. Don't know about other systems.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. No Version info tab in file properties?
    By cpjust in forum Windows Programming
    Replies: 2
    Last Post: 06-03-2008, 03:42 PM
  3. How to set File Version of VC++ 6 dll
    By mercury529 in forum Windows Programming
    Replies: 3
    Last Post: 12-08-2006, 02:49 PM
  4. Finding the windows version...
    By The_Muffin_Man in forum Windows Programming
    Replies: 1
    Last Post: 06-10-2004, 11:39 PM
  5. Version info?
    By Aidman in forum Tech Board
    Replies: 7
    Last Post: 07-03-2003, 10:44 AM