Using regex how do we extract multiple substrings inside of a string?
Suppose we have this:
resgrp/providers/Microsoft.Storage/storageAccounts/vvvvvdgdevstor","subject":"/blobServices/default/containers/coloradohhhhready/blobs/README_.._.hl7","eventType":"Microsoft.Storage.BlobCreated","eventTime":"2019-06-19T17:28:40.3136657Z","id":"604ad6c5a0145-04c4-26bsssss26a","data":{"api":"PutBlockList","clientRequestId":"aaaaaaae-4e68-95f6-c1ssssb02f"
The result I'd like is:
/coloradohhhhready/README_.._.hl7
What I've tried is:
(?i)(?<=\/containers\/)(.*)(?=\/blobs\/)(.*)(?<=\/blobs\/)(.*)(?=","eventtype)
Which yielded:
coloradohhhhready/blobs/README_.._.hl7
I would simply want to remove the /blobs/ segment inside of that string:

/after/blobsin your pattern, you could use the first and third capturing group(?i)(?<=\/containers\/)(.*)(?=\/blobs)(.*)(?<=\/blobs)(.*)(?=","eventtype)Perhaps you could update your pattern to(?i)(?<=\/containers)(/[^/]+)/blobs(/[^"/]+)(?=","eventtype")and use group 1 and group 2.match = match.Replace("/blobs/", "/"). Anyway, you cannot match discontinuous text within one match operation into a single group. Lookarounds are not meant to "make holes" in the texts you mach.