1
$\begingroup$

For example, suppose I want to retain only the content inside the argument of Distribute

Distribute[...Lengthly list of expressions ...] 
+ Distribute[...Lengthly list of expressions ...] + ..
(hundreds of such terms)

I could do a full document delete of the search item Distribute[ but would not be able to do the same for ] since the closing bracket may appear in other places where I want it to remain.

$\endgroup$
  • 3
    $\begingroup$ Quick and dirty fix: Find and replace Distribute with Identity. But I'm sure you're looking for something more elegant. $\endgroup$ – jjc385 May 1 '18 at 16:15
  • $\begingroup$ If your want to actually edit the code, then I don't think it's related to Mathematica. I'd try with Vim, emacs or perl, etc. $\endgroup$ – anderstood May 1 '18 at 16:24
  • $\begingroup$ ctrl+F and this. $\endgroup$ – AccidentalFourierTransform May 1 '18 at 16:25
  • $\begingroup$ Ok. Identity it is... $\endgroup$ – Quasar Supernova May 1 '18 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.