4
$\begingroup$

The Workbench webpage describing new features in version 2 lists the ability to "Search notebook documents with the Mathematica pattern search utility" under the heading Mathematica Front End Integration.

Does this feature in fact allow the user to search a Mathematica notebook document directly (i.e. interactively from within the front-end) for string pattern expressions, and if so, can anyone provide instructions on how to use this feature?

The NotebookFind command does not appear to support searching for string pattern expressions which raises the question of whether or not Workbench is using an undocumented Mathematica command and/or option to search for the pattern.

$\endgroup$
12
  • $\begingroup$ Nice question. You don't give up, hehe... By the way, you decided not to hand the bounty on the pattern highlighting question in the end? $\endgroup$
    – Rojo
    Commented May 27, 2012 at 9:07
  • 1
    $\begingroup$ I think this refers to the ability of the WB search/Mathematica search command to search for patterns like Plus[x_Integer,Times[_,_]] and come up with matches like 1+calcEccentricityEarthOrbit[t]*Cos[calcSunTrueAnomaly[t] \[Degree]]. It doesn't seem to do string patterns, but for that purpose the WB has a regular expression matcher built-in. $\endgroup$ Commented May 27, 2012 at 15:02
  • $\begingroup$ @Rojo: I tried to award the bounty to your answer yesterday evening on the earlier question only to discover a time limit that appears to have expired for doing so. If a moderator can directly assign you the 50 points given the circumstances here (i.e. my lack of familiarity with how bounties can be awarded and the fact that this was the first bounty I had placed on any question) I would appreciate their efforts. $\endgroup$ Commented May 27, 2012 at 21:29
  • $\begingroup$ @SjoerdC.deVries: Is it really true that the "Mathematica search command" (the same one accessible using Ctrl-F in the front-end) can search for expression patterns like the one you mention? I cannot replicate your example using either the built-in search & replace (Ctrl-F) or using the NotebookFind command. Others have suggested that one needs to search the string representation of the notebook in order to search for patterns but this is not an ideal solution for my intended application. $\endgroup$ Commented May 27, 2012 at 21:36
  • $\begingroup$ @StackExchanger You were talking about the workbench, which is completely different from the FrontEnd. $\endgroup$ Commented May 27, 2012 at 22:00

1 Answer 1

1
$\begingroup$

I think this refers to the ability of the WB search/Mathematica search command to search for patterns like Plus[x_Integer,Times[_,_]] and come up with matches like 1+calcEccentricityEarthOrbit[t]*Cos[calcSunTrueAnomaly[t] \[Degree]]. You'll find it in the Workbench Search menu. It has a tab called "Mathematica search".

It doesn't seem to do string patterns, but for that purpose the WB has a regular expression matcher built-in. This can be found in the first tab of the search box.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.