using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"da\s+Secretaria\s+de\s+Estado\s+de\s+Planejamento\s+e\s+Gestão";
string input = @"NOMEAR ISABELLE FERREIRA ZARONI, ID FUNCIONAL Nº
5100796-7, para exercer, com validade a contar de 16 de novembro
de 2020, o cargo em comissão de Assessor, símbolo DAS-7, da Sub-
secretaria de Concessões e Parcerias, da Secretaria de Estado de
Planejamento e Gestão, anteriormente ocupado por Vinicius dos San-
tos Silva, ID Funcional n° 5108029-0. Processo nº SEI-
1 2 0 0 0 1 / 0 1 4 6 11 / 2 0 2 0 .";
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