Table transformations

How to extract a domain from a website URL

2026-06-20
Task

A table contains full page URLs. The export needs a separate domain column with only the domain, without http://, https://, www., path, query parameters, or anchor.

Short Answer

You can do it without regular expressions by searching and removing substrings. For mixed URL formats, the regex option is shorter.

How to do it in Eofferix with substring search and removal

  1. Create the final domain column from url.
  2. In Transformations, add rules: Contains substring https://Remove substring https://; then the same rule for http://.
  3. Add a rule: Starts with www.Remove substring www..
  4. To remove path, query string, and anchor, use rule pairs for /, ?, and #: first Remove after, then Remove substring with the same character.
    Domain extraction rules using substring removal
    Without regex: protocol and www are removed as substrings; path and parameters are trimmed by separators.
  5. Save the column settings.

How to do it in Eofferix with regular expressions

  1. Create the final domain column from url.
  2. Add ^https?://Remove substring. ^ means the start of the string, https? means http or https, and :// is the literal protocol part.
  3. Add ^www\.Remove substring. The dot is escaped as \. because a plain dot in regex means any character.
  4. Add [/?#].*$Remove substring. [/?#] finds the first path, query, or anchor separator, .* takes everything after it, and $ means the end of the string.
    Regex rules for extracting a domain from a URL
    The regex version is shorter: three rules remove the protocol, www, and everything after the domain.
  5. Save the column settings.

Before / After

Before

source data
row_idurl
1https://www.shop.example.com/catalog/jackets?utm_source=feed

After

result
row_iddomain
1shop.example.com

Process data faster with Eofferix

Create a free account to automate catalogs and price lists around your own rules.

Sign up