package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)da\s+Secretaria\s+de\s+Estado\s+de\s+Planejamento\s+e\s+Gestão`)
var str = `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 .`
for i, match := range re.FindAllString(str, -1) {
fmt.Println(match, "found at index", i)
}
}
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 Golang, please visit: https://golang.org/pkg/regexp/