Fix version regex replacement

- Because version itself may have an integer, need to wrap replacement
  in braces. Additionally, we were not matching the "const" keyword.