Yahoo Pipes - How Do I Truncate the last 5 Characters
-
11-06-2021 - |
Question
I am using Yahoo Pipes to rewrite a URL. Everything is fine but the last 6 characters of the URL need to be removed from all the links.
Ex.
http://www.mysite.com/blahblah/34567
needs to be rewritten to
http://www.mysite.com/blahblah
The number at the end is always changing, so I am hoping to just chop the last 6 characters off of each url.
Solution
You'll want the Sub string module. Presuming it functions in a similar way to other languages, you'll want an undefined From value, and a Length value of -6, which should cut 6 characters off the end of the URL.
OTHER TIPS
Seems that a regex in (.*)(.....) and takinq only the first match should do the trick
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow