fixed bug in regexp (match too long, fixed by +? for shortest match) of replace call to remove parentheses