# Removing attributes from a URL address

**URL:** <https://forum.mergado.com/t/removing-attributes-from-a-url-address/1189>\
**Category:** Regular Expressions in Mergado\
**Tags:** regular-expressions\
**Created:** [August 13, 2025, 8:06am UTC](https://forum.mergado.com/t/removing-attributes-from-a-url-address/1189 "2025-08-13T08:06:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![veronika\_kusalikova](https://forum.mergado.com/user_avatar/forum.mergado.com/veronika_kusalikova/32/430_2.png) [@veronika\_kusalikova](https://forum.mergado.com/u/veronika_kusalikova)\
**Post date:** [August 13, 2025, 8:06am UTC](https://forum.mergado.com/t/removing-attributes-from-a-url-address/1189/1 "2025-08-13T08:06:32Z")

</div>

You can use regular expressions to easily remove attributes from product URLs if you don’t want them there.

**Problem:**

> …attributes remain in product URLs and I want to delete/shorten them. Example URL:  
> `https://www.mujsupereshop.cz/produkt/damske-tricko-friends/?attribute_pa_color=seda&attribute_pa_6f6cb72d544962fa333e2e=xxl`  
> And the final URL should look like this:  
> `https://www.mujsupereshop.cz/produkt/damske-tricko-friends/`

**Solution:**

In Mergado, all you need is one _Find and Replace_ rule with the “regular expression” checkbox selected. Enter the regular expression `\?.*$` in the Find field and leave the Replace field blank to remove the text.

The regular expression captures text starting with a question mark `\?` to the end of the URL address `.*$`.

Note: In this case, the question mark must be preceded by a backslash so that it is interpreted as a “normal” question mark, otherwise it is a regular expression character.

In the same way, it is possible to remove UTM parameters and other parameters from the URL address if they appear after the question mark.

**Example of a rule in Mergado:**

Tip: Don’t forget to check the box in the rule that you want to search as a “Regular expression”. 😉

 ![image](https://forum.mergado.com/uploads/default/original/2X/8/8a8d0731bdf8c336b28cd2094d5a8db71e6bf71f.png)

**Example of what a regular expression matches:**

 ![image](https://forum.mergado.com/uploads/default/original/2X/3/3e1dc181b6a2def4f88025b111e8c5baabf75ff8.png)
