Forum Academy Marketplace Showcase Pricing Features

Extract with Regex: Need pattern to remove the parameters from URLs

I’m trying to use Extract with Regex to remove the parameters from URLs.

I’m starting with URLs like:
https://books.google.ca/books?id=6CeKtAEACAAJ&dq=intitle:%22youtube+tv%22&hl=&cd=1&source=gbs_api

I want it to end up like:
https://books.google.ca/books?id=6CeKtAEACAAJ

In that case, I want everything after the & to be trimmed off of the URL.

What is the Regex pattern that I need to use to be able to accomplish this?

An easy way is to use :split by (new function in Bubble). use & as delimiter and use first item

4 Likes

Thanks @Jici ! That works brilliantly.

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.