How to use complex regular expressions to change both the repository name and the relative path on the source machine?

DISTRIBUTION: Using Path Mapping combinations when working with Release Bundles

AuthorFullName__c
Omer Borshan
articleNumber
000005768
ft:sourceType
Salesforce
FirstPublishedDate
2023-06-07T08:50:27Z
lastModifiedDate
2023-06-07
VersionNumber
1
In such a scenario, we would want to use a more complex regular expression:
generic-local-A/.*/(.*)  - > generic-local-C/new/folder/path/$1
generic-local-B/.*/(.*)  - > generic-local-C/new/folder/path/$1

User-added image
User-added image