In JS you can comment regular expressions, too... :)
var foo = new RegExp(
'\\d\+' + // First digit
'-' + // Delimiter
'\\d\+' // Second digit
);
foo.test("1234-5432");