You need to enable JavaScript to run this app.
Container Registry

Container Registry

Copy page
Download PDF
Registry replication
Regular expression matching examples
Copy page
Download PDF
Regular expression matching examples
Some Container Registry features, such as registry replication rules and tag retention rules, support using regular expressions to match namespaces, repository names, or image tags. This topic provides examples of commonly used regular expressions for reference.​
​
Matching method​
Matching target​
Regular expression​
Matching target name​
​
​
​
​
​
​
​
v1​
version-1​
test-1​
v2​
v3​
Exact match​
Only match the v1 tag.​
v1​
√​
-​
-​
-​
-​
Prefix matching​
Match all tags starting with v.​
^v.*$​
√​
√​
-​
√​
√​
Multi-prefix match​
Match all tags starting with v or t.​
^(v|t).*$​
√​
√​
√​
√​
√​
Suffix match​
Match all tags ending with -1.​
^.*-1$​
-​
√​
√​
-​
-​
Multi-suffix match​
Match all tags ending with 1 or 2.​
^.*(1|2)$​
√​
√​
√​
√​
-​
Tag match​
Match tags starting with v and ending with Arabic numerals.​
^v([0-9.]+)$​
√​
-​
-​
√​
√​
​
​
​
Last updated: 2026.09.23 14:37:25