concat-regexp is a function that takes a series of regular expressions (as String and/or RegExp objects) and returns them in concatenated form.
$ npm install concat-regexp
var concat = require('concat-regexp')
var username = 'alice'
concat(/^\/users\//, username, /\/?/, RegExp('$', 'i'))
// => /^\/users\/alice\/?$/i