Skip to main content

Within a Regular Expressions I would like to remove everything after the last /

Current State

www.mynuptials/confidential/do not read.docx

Desired State

www.mynuptials/confidential

I am trying to dynamically extract a document set name from the document URL

Are you able to just use web URL?


I'm not home yet....but I recall the WebUrl just gave me the Site Name but did not include the DocSetHome page but I will need to check....I want to be able to dynamically retrieve the DocSetHomePage as I have sever Documnet Sets which will then be placed in an email via a List Workflow.  It was suggested if I can remove the Documnet Name from the URL the result will be the DocSetHome page URL, but the only way I can figure out to do this is by removing all characters between the / / and the the end of the Documnet URL.  


Following regex should do the job

/[ws.]+$

Would I use a split ?   Also what does the below do....I'm not sure if the (.+] bracket is correct

_+/(.+]//*/]+S

I found the above at https://threewill.com/getting-started-with-nintex/ 

but am having a hard time reading it and understanding


no, use 'replace text' with empty text tp replace with

205418_pastedImage_1.png


or a little bit shorter:

/[^/]+$

How do i remove everything BEFORE last space?


Reply