a-zA-Z0-9А-Яа-я_
. Как я это делаю:rootApp.all(/\+(\w+|\p{L}+)/, function (req, res, next) {
res.cookie("referer", req.params[0]);
res.send(req.params);
});
GET /+А - 404 NOT FOUND
GET /+ref - {"0":"ref"}
GET /+ref_123ру_ - {"0":"ref_123"}
rootApp.all(/\+(\S+)/, function (req, res, next) {
var decodedPath = decodeURIComponent(req.path),
regexp = /\+[a-zA-Z0-9А-Яа-я_]+/;
var executed = regexp.exec(decodedPath);
if (executed != null) {
var parsed = executed[0].slice(1);
res.cookie("referer", parsed);
res.send(parsed);
}
else next();
});