Lines Matching refs:pattern
193 // Regex pattern captures "key: value" pair from the content.
194 pattern := regexp.MustCompile(`(?m)(?P<key>\w+):\s+(?P<value>\w+)$`)
197 // referencing the values captured by the regex pattern.
203 for _, submatches := range pattern.FindAllSubmatchIndex(content, -1) {
206 result = pattern.Expand(result, template, content, submatches)
225 // Regex pattern captures "key: value" pair from the content.
226 pattern := regexp.MustCompile(`(?m)(?P<key>\w+):\s+(?P<value>\w+)$`)
229 // referencing the values captured by the regex pattern.
235 for _, submatches := range pattern.FindAllStringSubmatchIndex(content, -1) {
238 result = pattern.ExpandString(result, template, content, submatches)