Using Split in text formatter but its splitting AND *removing whats there after*

Status: Closed · Asked by Jeorey on · 0 views

Jeorey — Question ·

Good day folks, I am trying to split the first slash, since third is not an option. What I really need is the second half of the split not the first half. Would anybody have any idea as to why I am receiving uniquely the left portion of the split and not both, the left and right portion of the split in my inputs? Ie:
What I envision the split on the first / occurrence to be is something like this:
So this input
1) www.journaldemontreal.com/2021/11/01/questions-autour-de-lhypotheque-fixe-5-ans
Becoming:

1) www.journaldemontreal.com

2) /2021/11/01/questions-autour-de-lhypotheque-fixe-5-ans
(as the second half is of importance to me)

I would greatly appreciate any help. Sadly, I am not the best with regex so this is my only option, unless someone has a regex solution haha. I am trying to translate articles into English via google translate, so I am redesigning the link to be Google's link

Jeorey — Reply ·

Th

This should work if the URL format stays the same -


The problem with all, is that it breaks the url into numerous pieces. I wont be using the same url source so perhaps one input will be split into 4 and the other into 5 so its not reliable to stitch that way.

Split should give you two inputs, because right now its doing more than a split, its splitting and only showing one half of the split, not the other half which is in need. I want to capture everything after the third slash/ ie Https:*//bablavla.ca/*THIS_IS/WHAT?INEED.test

Fagun Shah — Reply ·
Th

The problem with all, is that it breaks the url into numerous pieces. I wont be using the same url source so perhaps one input will be split into 4 and the other into 5 so its not reliable to stitch that way.

Split should give you two inputs, because right now its doing more than a split, its splitting and only showing one half of the split, not the other half which is in need. I want to capture everything after the third slash/ ie Https:*//bablavla.ca/*THIS_IS/WHAT INEED.test


I am not good at Regex, but found a Regex that gives you everything before 3rd '/'and then you can use that to split the text after that in next step.

May be @Supreme @Pabbly can give you direct Regex that matches everything after 3rd occurance of '/'

Fagun Shah
- Automation Freelancer
- Let's Connect - https://www.facebook.com/fagun.shah.7/
Jeorey — Reply ·
I am not good at Regex, but found a Regex that gives you everything before 3rd '/'and then you can use that to split the text after that in next step.

May be @Supreme @Pabbly can give you direct Regex that matches everything after 3rd occurance of '/'


I would be so Greatful if one of them could help or if pabbly could could provide both pieces of data after a split
Fagun Shah — Reply ·
I would be so Greatful if one of them could help or if pabbly could could provide both pieces of data after a split

With my above solution you will get both pieces of the URL, before and after 3rd '/'.

In the 2nd step you will get left side part of 3rd '/'and in the 3rd step you are getting Right of 3rd '/' part.

Fagun Shah
- Automation Freelancer
- Let's Connect - https://www.facebook.com/fagun.shah.7/

Back to all forum threads · Log in to reply