I have markdown content with multiple images where each image is:

I am selecting all images in the markdown content using Regex:
var matches = new Regex(@"!\[.*?\]\((.*?)\)").Matches(content);
With this I get two groups for each match:
Groups[0] = ; > (Everything)
Groups[1] = /image-path.png > (Image Path)
For each image path in `content need to replace it by a new Guid.
And then add each Guid and image path to the following dictionary.
Dictionary<String, String> imagePathsKeys = new Dictionary<String, String>();
I was trying to use Regex.Replace
but I can't find a way to replace only the image path in "!\[.*?\]\((.*?)\)"
with a Guid, extract the old value and add both to the dictionary as Key and Value.