Extract a specific function in C source code

Discussion in 'C Programming' started by kittywindz2, Dec 4, 2010.

  1. kittywindz2

    kittywindz2

    Joined:
    Dec 2, 2010
    Messages:
    3
    Hello,
    How can I extract a specific function in C source code and print the function on the command line environment(non-gui),I tried regex, but the match end at the first { .
    It is: /((\w+)\s*(\w+)\s*\(([\w\s,<>\[\].=&':\/*]*?)\)\s*(const)?\s*\{([^\}])+\})/.
    I don't know how to handle the brace, please help me.
    Thank you very much.
    Tony
    kittywindz2, Dec 4, 2010
    #1
    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. Xing Xu

    About extract call graph from C source code

    Xing Xu, Jan 14, 2004, in forum: C Programming
    Replies:
    6
    Views:
    6,642
    James Antill
    Jan 17, 2004
  2. Elric02@rogers.com
    Replies:
    4
    Views:
    451
    Dennis Lee Bieber
    May 17, 2006
  3. Elric02@rogers.com
    Replies:
    10
    Views:
    533
    Philippe Martin
    May 17, 2006
  4. =?ISO-8859-1?Q?Arne_Vajh=F8j?=

    How to extract specific items from an ArrayList?

    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Feb 20, 2007, in forum: Java
    Replies:
    3
    Views:
    1,225
    Daniel Pitts
    Feb 20, 2007
  5. Pavel Shved
    Replies:
    11
    Views:
    538
    Pavel Shved
    Nov 12, 2007
Loading...

Share This Page