Guest User

Untitled

a guest
Jun 25th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. //These two should match
  2. this.myMethod_1 = function(test){ return "foo" }; //Standard
  3. this.myMethod_2 = function(test, test2){ return "foo" }; //Spaces before
  4.  
  5. //All of therse should not
  6. //this.myMethod_3 = function(test){ return "foo" }; //Comment shouldn't match
  7. /**
  8. *this.myMethod_4 = function(test){ return "foo" }; //Block comment shouldn't match
  9. */
  10.  
  11. // this.myMethod_5 = function(test){ return "foo" }; //Comment them spaces shouldn't match
  12.  
  13. /*
  14. * this.myMethod_6 = function(test){ return "foo" }; //Block comment + spaces shouldn't match
  15. */
  16.  
  17. this.closure = (function(){ alert("test") })(); //closures shouldn't match
  18.  
  19. /(?<=this.)w*(?=s*=s*function()/g // matches a simple constructor
  20. /^/// // if it matches then this line starts with a comment
Add Comment
Please, Sign In to add comment