using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^\|.*\|\n\|\s*[:-]+.*\n(?:\|.*\|\n)*";
string input = @"# Project Overview
Welcome to the project overview document. This document provides a summary of the project, including key milestones and team members.
## Key Milestones
The following table outlines the key milestones for the project:
| Milestone | Description | Due Date |
|-----------------|--------------------------------------|------------|
| Project Kickoff | Initial project meeting | 2024-06-01 |
| Phase 1 | Completion of the first development phase | 2024-07-15 |
| Testing | Start of the testing phase | 2024-08-01 |
| Launch | Official project launch | 2024-09-01 |
## Team Members
Below is a table listing the team members involved in the project:
| Name | Role | Contact Email |
|-----------------|---------------------|------------------------|
| Alice Johnson | Project Manager | alice.johnson@example.com |
| Bob Smith | Lead Developer | bob.smith@example.com |
| Carol White | QA Engineer | carol.white@example.com |
| David Brown | UX Designer | david.brown@example.com |
";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx