I am working with multi-line text, usually html, which I need to scan for a specific string (`snippet code`) that contains a dynamic substring (`field name`). This substring will be used as a parameter for looking up data and replacing the entire initial string.

Initial String: `${config[" DYNAMIC STRING HERE "]}`

The idea here is we create template pages that are filled with these snippet codes, and when the page is rendered, the snippets are replace with a corresponding value from a configuration tool.

In the code below, the `args.FieldValue` is the text that needs parsing. Currently, I am using the regex `@"\${config\[\""(?<fieldName>.*)\""\]}"` which can be found below. This should place the matches values in the `fieldName` group.

Code:

```
// Group all of the field names in the config group.
var matchCollection = Regex.Matches(args.FieldValue, @"\${config\[\""(?<fieldName>.*)\""\]}");

// If there are matches, process them.
if (matchCollection.Count > 0)
{
  // Takes the field names from the collection and converts them to snippet objects.
  List<Snippet> snippets = GetSnippetsFromField(args, matchCollection);

  // Replaces all of the snippet codes with values from the config tool.
  RenderSnippets(ref args, snippets);
}

```

Sample String:

```
"Lorem ipsum dolor sit ${config["First Name"]}, consectetur adipiscing ${config["Title"]}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
${config["First Name"]} ${config["Last Name"]} sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

```

As it stands, the regex works when there is a single snippet code on a line. But when there are more than one, it grabs all of the text between the first `${config["` nad last `"]}`. This is due to the `.*` for sure, and I only need to check for [A-Za-z] and spaces, but for the life of me I cannot get it to find any matches when I attempt that or any other variation I have been able to find on SO.

Any and all help would be greatly appreciated.