Fix _cat/allocation rest test

Improvements to regular expressions to be smarter about optional values.