What are the supported RegEx syntax for redirects in Nabu Redirect Manager?
Nabu Redirect Manager supports JavaScript-style Regular Expressions (RegEx) for setting up advanced redirects in your Shopify store.
RegEx redirects run in the visitor's browser on pages that show a 404. They aren't server-side 301 redirects.
Supported RegEx Syntax
Here are the main RegEx features supported in the app:
- Anchors
^ → Matches the start of a URL path.
$ → Matches the end of a URL path.
- Character Classes
. → Matches any single character.
[abc] → Matches any one character inside the brackets.
[0-9] → Matches any digit between 0–9.
[^abc] → Matches any character except a, b, or c.
- Quantifiers
(*) → Matches 0 or more repetitions.
(+) → Matches 1 or more repetitions.
? → Matches 0 or 1 repetition.
{n} → Matches exactly n times.
{n,} → Matches n or more times.
{n,m} → Matches between n and m times.
- Groups and Alternation
( ) → Defines a capture group.
→ Works like OR between patterns.- Capture Groups
(pattern) → Captures part of the match.
$1, $2, … $5 → Reuse captured values in the target link.
Nabu supports up to 5 capture groups.
Not supported and limits
- Not supported: lookarounds, backreferences,
\p{}, atomic or conditional groups, and nested repeats. - A pattern can be at most 200 characters, with at most 5 capture groups.
- There are also limits on how complex repeats and
|alternatives can be.
Shopify Examples
- Redirect product URLs that no longer exist to a single collection :
- Redirect product IDs (numbers only) that no longer exist to a new collection
- Redirect with capture groups
- Redirect both products and collections
Updated on: 05/12/2026
Thank you!