Undefined Title

Group values of regular expression in CoffeeScript

2013-05-26

Easy to refer group values of regular expression in CoffeeScript.

Let’s say you parse URL, then you can write like this.

[_, path, queryParams] = req.url.match /([^?]+)\?(.*)/

Pretty useful.