Custom style guide rule for X By Y impossible

Nick Udell

I'm trying to add a style guide rule to convert instances of "20 by 30 foot rectangle" to "20-by-30-foot rectangle".

I'm using the Match "CD by CD foot" and Replacement "$0-by- $2-foot" but I cannot get it to correctly output the first cardinal number.

Instead, testing with "20-by-30-foot rectangle" gives me:
Rule : by 30 foot Suggests : -by-30-foot

How can I create this simple rule?