cancel
Showing results for 
Search instead for 
Did you mean: 
roseka
Nintex Newbie

Extract Regular Expression

Jump to solution

Whats the expression that i can use to extract url without filename ?

https://xyz/sites/test/file.xlsb

Labels: (2)
Reply
7 Replies
Nintex Employee
Nintex Employee

Re: Extract Regular Expression

Jump to solution

Try using this expression in the Pattern field:  /[^/]*$

The steps to configure the Regular Expression action are in my blog post: Remove a Forward Slash at the End of a URL String in Nintex Workflow

0 Kudos
Reply
roseka
Nintex Newbie

Re: Extract Regular Expression

Jump to solution

Hi Eric, 

Thank you for reply. /[^/]*$ gets filename and removes url. I need url without filename.

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Extract Regular Expression

Jump to solution

Hi Rose,

Which version of Nintex Workflow are you using? I ran this in both Nintex Workflow 2013 and Nintex Workflow for O365, with both returning just the URL from your expression. If you're using the Nintex Workflow 2013, try using the Run Now option to see what you get. Below is how I configured the Regular Expression action.

Regular Expression - Remove file to get URL

0 Kudos
Reply
roseka
Nintex Newbie

Re: Extract Regular Expression

Jump to solution

HI Eric, 

With Replace i got it. What would be the expression if i want to use extract option to store in collection variable ?

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Extract Regular Expression

Jump to solution

Try this pattern:  .*(?=\/)

Reply
roseka
Nintex Newbie

Re: Extract Regular Expression

Jump to solution

Thank You Eric. By using this i got url without filename but with ; at end. 

https://xyz/sites/test/file.xlsb  - Result: https://xyz/sites/test;

Reply
roseka
Nintex Newbie

Re: Extract Regular Expression

Jump to solution

Thank You Eric. By using this i got url without filename but with ; at end. 

https://xyz/sites/test/file.xlsb  - Result: https://xyz/sites/test;

I have used  .*(?=\/)/ and it worked. Thank You once again.

Reply