/// <summary> /// Executes a delegate for each match of a block comment found /// Note: nested comments are not supported /// </summary> public static void ForEachBlockComment(string text, Action <Match> eval) { foreach (Match match in CommentsRegex.Matches(text)) { eval(match); } }
/// <summary> /// Returns a string without block comments /// Note: nested comments are not supported /// </summary> public static string WithoutBlockComments(string text, MatchEvaluator eval) { return(CommentsRegex.Replace(text, eval)); }