javascript - regex for functions containing underscore in their name -
i using sublime text 2 , have project contains java script files. want search in of java script files if there functions contain underscore in names/definition. e.g.
function search_user( arg1 , arg2 )
or
function search_another_user ( arg1 , arg2 , arg_3 )
it doesn't matter if there underscore in param name
so in words regex can be
function <spaces , tabs> <function name containing underscore> < spaces , tabs > ( <any number of args> )
i'm hoping you're asking because want convert of these camelcase function names :)
search_user
=>searchuser
search_another_user
=>searchanotheruser
right? :)
use in search field regexp turned on
function\s+\w*_\w*
Comments
Post a Comment