Skip to content

Instantly share code, notes, and snippets.

@calebreister
Last active August 29, 2015 14:05
Show Gist options
  • Save calebreister/457fea9cb1d63e08e19d to your computer and use it in GitHub Desktop.
Save calebreister/457fea9cb1d63e08e19d to your computer and use it in GitHub Desktop.
This file provides two useful regular expressions that match a C/C++ function prototype. I plan on using this to create a script that converts C and C++ headers into implementation file.
Match a prototype:
[^\s]([\w=+-/*%<>:, ]+)[^\s]\(.*\)([\w,: ]*)?;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment