Node.js examples for Regular expression:Match
Get param for name
function getParam(name){ return (name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search)) ? decodeURIComponent(name[1]) : "";//from w w w . j a v a 2s . c o m }