NotebookFind

NotebookFind[obj,data]
sets the current selection in the specified notebook object to be the next occurrence of data.

NotebookFind[obj,data,Previous]
sets the current selection to be the previous occurrence.

NotebookFind[obj,data,All]
sets the current selection to be all occurrences.

NotebookFind[obj,data,dir,elems]
sets the current selection to be the occurrence in the direction dir and searches the elements of cells specified by elems.

Details and OptionsDetails and Options

  • NotebookFind returns $Failed if the search it performs finds no occurrence of data.
  • obj may be a NotebookObject or a CellObject. If obj is a NotebookObject, then the find operation starts where the selection is in the notebook.
  • data can be a string, box expression, or a complete cell.
  • Possible values of dir include , , and All.
  • The possible elements are:
  • CellContentscontents of each cell, represented as a string
    CellIDsetting for the CellID option of each cell
    CellLabelsetting for the CellLabel option of each cell
    CellStylename of style for each cell
    CellTagsparts of the setting for the CellTags option for each cell
    {elem1,elem2,}list of different types of elements
  • The default for elems is . Only the contents of boxes, not their styles or options, are included in the search.
  • The following options can be given:
  • AutoScrollTruewhether to scroll the notebook to the found result automatically
    IgnoreCaseFalsewhether to treat lowercase and uppercase letters as equivalent
    WordSearchFalsewhether to require that the text searched for appear as a word
    WrapAroundFalseif no result is found in the given direction, whether to wrap around and keep searching
  • The front end will highlight the region corresponding to the result.
Introduced in 1996
(3.0)
| Updated in 2014
(10.0)