diff --git a/api-spec-testing/rspec_matchers.rb b/api-spec-testing/rspec_matchers.rb
index <HASH>..<HASH> 100644
--- a/api-spec-testing/rspec_matchers.rb
+++ b/api-spec-testing/rspec_matchers.rb
@@ -227,8 +227,12 @@ RSpec::Matchers.define :match_response do |pairs, test|
   def compare_string(expected, actual_value, test, response)
     # When you must match a regex. For example:
     #   match: {task: '/.+:\d+/'}
-    if expected[0] == "/" && expected[-1] == "/"
-      /#{expected.tr("/", "")}/ =~ actual_value
+    if expected[0] == '/' && expected[-1] == '/'
+      parsed = expected
+      expected.scan(/\$\{([a-z_0-9]+)\}/) do |match|
+        parsed = parsed.gsub(/\$\{?#{match.first}\}?/, test.cached_values[match.first])
+      end
+      /#{parsed.tr("/", "")}/ =~ actual_value
     elsif !!(expected.match?(/[0-9]{1}\.[0-9]+E[0-9]+/))
       # When the value in the yaml test is a big number, the format is
       # different from what Ruby uses, so we transform  X.XXXXEXX to X.XXXXXe+XX
Test Runner: Modify rspec_matcher to parse more than one regex in expected values