C version of regex?

This is a discussion on C version of regex? within the C Programming forums, part of the General Programming Boards category; i'm having troubles figuring out a way to find ".doc" files in a given directory. I know c++ one can ...

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    103

    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
    Location
    TX
    Posts
    2,047
    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
    Posts
    131
    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, 01: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21