Path Mapping - replace local path with url, and remove extension

I have set up a Path Mapping to replace local path with url. We use extensionless urls, so that[INSERT GUID] is the url to the pdf.

I can replace the first part of the file path.

I tried creating another Path Map to replace “.pdf” with “” (blank), but Replacement is required validation showed.

Do you have any suggestions on anything that can be done now?