Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //These two should match
- this.myMethod_1 = function(test){ return "foo" }; //Standard
- this.myMethod_2 = function(test, test2){ return "foo" }; //Spaces before
- //All of therse should not
- //this.myMethod_3 = function(test){ return "foo" }; //Comment shouldn't match
- /**
- *this.myMethod_4 = function(test){ return "foo" }; //Block comment shouldn't match
- */
- // this.myMethod_5 = function(test){ return "foo" }; //Comment them spaces shouldn't match
- /*
- * this.myMethod_6 = function(test){ return "foo" }; //Block comment + spaces shouldn't match
- */
- this.closure = (function(){ alert("test") })(); //closures shouldn't match
- /(?<=this.)w*(?=s*=s*function()/g // matches a simple constructor
- /^/// // if it matches then this line starts with a comment
Add Comment
Please, Sign In to add comment