Bean Help - Menu - Find
Keywords: cursorLocation=537

Find Menu

Find/Replace...: shows the Find/Replace panel, which is used to find text of interest in the front-most document.

NOTES: When using Bean's Find panel, searches always 'wrap' (continue to search unsearched beginning of document after reaching end). 'Replace' will not replace the text selection unless the selected text matches the Find field text. The only regular expression symbol you can use in the replace field is \0 (note: that's the digit zero, not the letter O), which stands for any found matches. When pattern matching is active, characters that are pattern matching symbols ( *?+[(){}^$|\./ ) have to be preceded with a '\' to be treated literally.

Find/Replace Shortcuts

option-tab: inserts tab character into search field

option-return: inserts return character into search field

Match Patterns (Regex)

The Find/Replace... panel in Bean can use pattern matching ('regular expressions') to find text of interest. In a regular expression (often just 'regex'), certain letters become symbols for patterns that the Find panel uses to find text of interest, like the well-known ‘wildcard character’ but more powerful. Pattern matching allows you to easily include tabs, paragraph breaks, page breaks, word boundaries, digit wildcards, alternate spellings, etc. in your searches. The Patterns... drop down menu gives you this power without having to learn any special symbols.

Select the Match patterns (regex) button to enable the use of regular expressions in the Find panel. Notice that the find field changes color to indicate that pattern matching is active. Since common symbols like . ? * \ and so on have special meaning when pattern matching, leave this feature turned off until you need it. (Note: the symbols *?+[(){}^$|\./ are treated literally in a regular expression when preceded by a \ character).

The only regular expression symbol you can use in the replace field is \0, which inserts the found match into the text that will replace it. Just to be clear, that's a zero in the pattern, not the letter O.

The use of regular expressions is a complex topic, and there are many more options than those in the Patterns... menu. For example, using this regex in the search field with Select All will select all tags in an HTML document:

(\<(/?[^\>]+)\>)

You can create a regex with very complex syntax. If the syntax is not correct, an alert will show.

Find Next: finds the next occurence of the text specified in the Find panel's find field.

Find Previous: finds the previous occurence of the text specified in the Find panel's find field.

Use Selection: places the selected text in the Find panel's find field.

Jump to Selection: centers any selected text in the document's window.

Location of Last Edit: useful for when you go to another part of a document, then need to return instantly to the location of your last edit (without having to hunt for it).

Complete Word: produces a list of possible word completions for the incomplete word at the insertion point. Also available via the Escape key.

Define Word: reveals a definition for the word nearest the insertion point, or suggests a spellcheck if the word is not found to be valid.