Skip to content

Instantly share code, notes, and snippets.

@MathieuAuclair
Last active May 3, 2019 18:05
Show Gist options
  • Save MathieuAuclair/5298cc04f349bcef353c043097250846 to your computer and use it in GitHub Desktop.
Save MathieuAuclair/5298cc04f349bcef353c043097250846 to your computer and use it in GitHub Desktop.
Set of regex to catch @tag in a text
RegexDictionary = new Dictionary<string, Regex>
{
{"tests", new Regex("@tests\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
{"fixed", new Regex("@fixed\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
{"review", new Regex("@review\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
{"tested", new Regex("@tested\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
{"submitassistant", new Regex("@submitassistant\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
{"releasenotes", new Regex("@releasenotes\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
{"change", new Regex("@change\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
{"waswarned", new Regex("@waswarned\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
{"inprogress", new Regex("@inprogress\\((.*?)\\)(.*?)@.*?\\(.*?\\)", option)},
};
// This regex will catch the content in a @tag or after the at tag
/// EXEMPLE - trying to get the content in @fixed tag
//
// @fixed(<this content will be catched>) <This content will too!> @ <this too> @othertag(<not catched>) <not cached!>
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment