Standard regex for multiple different domains
Optimized regex for URLs with the same domain (reading the section "How does it work" in the FAQ before using this option is highly recommended)
Ignore protocols (http:// + https://) ->
Ignore traling slashes (/) ->
Use double slash escaping (\\.) ->
Regex end matching changes
Regex start matching changes
How does it work
Input your URLs into the left text area. URLs must be on separate rows and can be in any form, but it’s recommended to perform some cleanup. You can use the URL Builder for that. Input is unlimited, but optimal is approximately 1000 rows. Above this limit, the tool will be slower. If you need to clean up or unify your URLs (remove protocols, parameters, etc.), you should use URL Builder.
Select how you want to create your regex. There are several options for regex and some customization. Please, read the FAQ section below to understand all possibilities and regex usage better.
Copy your final regex from the output text area. For this, use a button Copy output, which works in the same way as shortcut CRTL+C. Now you can use regex anywhere you need, for example, as the custom segment in Google Analytics.
FAQ & Contact
URL Regexator is a tool for creating regex from multiple URLs. It will help you with creating custom segments in Google Analytics and analyzing website data. Using Regexator is much faster than creating custom spreadsheets in Excel or Google Sheets with many tricky functions.