Skip to main content
Nintex Community Menu Bar
Solved

Workflow regular expression: replace url part after 3rd slash

  • February 21, 2022
  • 1 reply
  • 183 views

Forum|alt.badge.img+4

I've got a regular expression action in Nintex Workflow where I need to replace everything after the third slash of a url.

- This is the url: http://www.testurl.com/this-part/needs-to/be-replaced

- This part should be replaced: this-part/needs-to/be-replaced

- With this: become-this


So the final url is like this: http://www.testurl.com/become-this 

 

What Regex pattern should I use for this?

Best answer by mlauer

You can use the pattern ^([^/]+//[^/]+/).*$ and the replacement text $1become-this

 

 

1 reply

Forum|alt.badge.img+9
  • Answer
  • February 21, 2022

You can use the pattern ^([^/]+//[^/]+/).*$ and the replacement text $1become-this