Skip to content

Instantly share code, notes, and snippets.

@mnaoumov
Created November 22, 2014 21:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnaoumov/49fbdc6094508650d879 to your computer and use it in GitHub Desktop.
Save mnaoumov/49fbdc6094508650d879 to your computer and use it in GitHub Desktop.
string testString = @"
FUNCTION ""Timer_€_OC"" : Void
...
END_FUNCTION";
var functionRegex = new Regex(@"FUNCTION\s*\""(?<Name>[^\""]+)\""\s*\:\s*(?<Type>[\S]+)");
var match = functionRegex.Match(testString);
Debug.Assert(match.Groups["Name"].Value == "Timer_€_OC");
Debug.Assert(match.Groups["Type"].Value == "Void");
@yetibrain
Copy link

Hi mnaoumov,
thanks a lot for the code, i will try this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment