RegEx to replace function with it's argument
Sometimes JSON output can contain values that are functions. The best way to overcome this is to actually export the data properly so it's actually JSON. Should that not be possible, this regex will help you replace things like:
{"dateCreated": ISODate("2013-07-19T15:32:56.049Z")}
with
{"dateCreated": "2013-07-19T15:32:56.049Z"}
In your text editor find this:
function_name[^(]*\(([^)]*)\)
Replace this:
$1
NB: This doesn't work for multiple arguments
Written by Tom Loudon
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Regex
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#