How do I remove all characters after /


Badge +9

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


7 replies

Badge +16

Are you able to just use web URL?

Badge +9

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.  

Userlevel 5
Badge +14

Following regex should do the job

/[ws.]+$
Badge +9

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

Userlevel 5
Badge +14

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

205418_pastedImage_1.png

Badge +9

or a little bit shorter:

/[^/]+$
Badge +9

How do i remove everything BEFORE last space?

Reply