I'm reading some file contents and I want to match all function calls that is not test()
in nodejs. test()
can have any type of parameters and as many as possible. And all matched functions should include all the parameters including the closing )
. E.g.
test({
firstname: firstname({ userid: 12 }),
lastname: lastname({ userid: 12 })
});
In the example above firstname and lastname is matched and the resulted matched string shoud be firstname({ userid: 12 })
and lastname({ userid: 12 })
.