diff --git a/eng/versioning/utils.py b/eng/versioning/utils.py
index 0b2117c61c5c..cc542b620350 100644
--- a/eng/versioning/utils.py
+++ b/eng/versioning/utils.py
@@ -27,7 +27,11 @@
# External dependency versions do not have to match semver format and the semver regular expressions
# will partially match and produce some hilarious results.
-external_dependency_version_regex = r'(?<=).+?(?=)'
+# Match version content inside any XML element, not just .
+# This handles custom property tags like 2.18.6
+# that carry {x-version-update} comments but are not wrapped in elements.
+# The lookahead (?=[a-zA-Z]) ensures we don't match content before XML comments ().
+external_dependency_version_regex = r'(?<=>)[^<]+(?=[a-zA-Z])'
# This is the original regular expression for semver. This differs from the
# previous one in that start of line and end of line anchors are left in place.