constructeur regexp js

var reg = new RegExp('(\s)$');
//Note that the expression is not contained within backslashes.
FlashingMustard