libs/mocha/should.js
function(regexp, desc){
        this.assert(
            regexp.exec(this.obj)
            , function(){ return 'expected ' + this.inspect + ' to match ' + regexp + (desc ? " | " + desc : "") }
            , function(){ return 'expected ' + this.inspect + ' not to match ' + regexp + (desc ? " | " + desc : "") });
        return this;
    }
function(regexp, desc){
        this.assert(
            regexp.exec(this.obj)
            , function(){ return 'expected ' + this.inspect + ' to match ' + regexp + (desc ? " | " + desc : "") }
            , function(){ return 'expected ' + this.inspect + ' not to match ' + regexp + (desc ? " | " + desc : "") });
        return this;
    }
function ( regexp , desc ) { this . assert ( regexp . exec ( this . obj ) , function ( ) { return 'expected ' + this . inspect + ' to match ' + regexp + ( desc ? " | " + desc : "" ) } , function ( ) { return 'expected ' + this . inspect + ' not to match ' + regexp + ( desc ? " | " + desc : "" ) } ) ; return this ; }
Assert string value matches _regexp_.

@param {RegExp} regexp
@param {String} description
@api public
Assert string value matches _regexp_ .