diff --git a/v2/tools/common.jam b/v2/tools/common.jam
index 62b5941f8..5a1b866a9 100644
--- a/v2/tools/common.jam
+++ b/v2/tools/common.jam
@@ -643,7 +643,8 @@ actions hard-link
# value as the version number.
# [joiner]
# :: Direct lookup of the given property-name value in the
-# build properties.
+# build properties. /property-name/ is a regular expression.
+# e.g. will match every toolset.
# /otherwise/
# :: The literal value of the format argument.
#
@@ -693,12 +694,15 @@ rule format-name ( format * : name : type ? : property-set )
case :
local key = [ MATCH : $(f:G) ] ;
- local p = [ $(property-set).get [ MATCH : $(f:G) ] ] ;
- if $(p)
- {
- result += [ join-tag $(f:G=) : $(p) ] ;
+ local p0 = [ MATCH <($(key))> : [ $(property-set).raw ] ] ;
+ if $(p0) {
+ local p = [ $(property-set).get <$(p0)> ] ;
+ if $(p)
+ {
+ result += [ join-tag $(f:G=) : $(p) ] ;
+ }
}
-
+
case * :
result += $(f:G=) ;
}