Skip to content

Instantly share code, notes, and snippets.

@benwei
Created November 27, 2012 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benwei/4153682 to your computer and use it in GitHub Desktop.
Save benwei/4153682 to your computer and use it in GitHub Desktop.
convert function to that.func (javascript)
// regexp
// convert
// function a (a1,a2)
// that.a = function (a1, a2)
cat jsfile.js | sed -e 's/^\([ \t]*\)function[ \t]*\([a-zA-Z]*\)(/\1that.\2 = function (/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment