Cut URLs into pieces

Hello, I’m looking for a way to trim an URL into multiple pieces.

  • Domain (without protocols)
  • Path
  • Parameters


→ Should get:

Maybe I’m looking at the wrong place, but how could I do that?

Regex is the friend to be googling for :slight_smile: eg

1 Like

You’ll need to add 3 text elements:

  1. Get data from current page URL → Find & Replace (https://) → split by (/) → item#1 (screenshot below :point_down:)
  2. Get data from current page URL → Path List → item#1
  3. Get data from current page URL → Parameter → Input parameter key(name) → Input parameter type

Stop, I don’t need applause :clap: :joy:


@lindsay_knowcode Thank you for the hint! It seems like the ‘proper’ solution. Includes learning how to use Regex with Javascript.

@bestbubbledev How many hours did you search to get this?! That’s a fantastic workaround without Regex! Thanks a ton!!!

1 Like

It took me about 20 minutes to figure out how to get the domain :muscle: I knew how to do the rest :sunglasses:

To add another solution to your pile, I would really recommend @sudsy ’s Sudsy Page plugin. It does exactly this, plus gives you a lot of routing capabilities.