Fixed issue with `bundle exec rake routes` not running.

Wrap regex comments in (?#comment) construct.
Merge pull request #5922 from jhollingsworth/fix/rake-routes

Fixed issue with `bundle exec rake routes` not running.