menu bar

Searching

This chapter discusses the items found in the Find Dialog. It also gives some details on multi file search. If you are looking for information on grep, see the chapter on regular expressions.

This is the Find Dialog:

screen06

As you can see, there are quite some options in this dialog. I'll try to explain all of them here.

Find and Replace Edit Fields

The two big edit fields on the upper half of the dialog can be used to enter the text to find and the text that should replace the found text.

As you can see the Find: label is actually a popup menu. If you click this, a menu will be presented containing several grep patterns. You can edit this list in the preferences dialog. You can also use this popup to add the current search patterns to this list.

Ignore Case

If this option is checked, the search will be done case insensitive. This means that the words "Hi" and "hi" will be considered of equal value.

Wrap Around

When this option is checked and the text could not be found starting from the current position in the document, the search will restart at the beginning (or end if Backwards is checked) of the document.

Backwards

When this option is checked, the search will be done in reverse order, moving towards the top of the document, and start from the current position, as usual.

Entire Word

When this option is checked, only text marked by a word boundary will be found. I.e. the first and the last character of the found text must be alphanumeric and the last character before and immediately after the found text must not be alphanumeric.

Grep

If this option is not checked, the text to be found must be exactly the same as the text in the Find edit box. However, if this option is checked, the text in the Find edit box will be regarded as a regular expression and Pe will search for text matching that pattern.
See the chapter on regular expressions for more info on this interesting subject.

Batch

When this option is checked, all the found items will be put in a separate list shown in a new window. This is especially useful if you are searching through multiple files.

Find Button

The find button starts the search.

Replace Button

The replace button replaces the currently-found text. This button is only enabled when the text selected matches the text entered in the Find field.

Replace & Find

The replace & find button is an alternative way of clicking replace and then find.

Replace All

Replace all replaces all occurrences of the text in Find with the text in Replace. Mind the word 'all', Pe starts replacing from the top of the document onwards, no matter where the current caret is positioned.

Multi File Search Options

One of the strengths of Pe lies in its multi-file search capabilities. You can use Pe to search through all the Be Header files, e.g. or all the e-mail stored on your harddisk.
You turn on this capability by checking the Multi-File Checkbox.

Method

The method popup menu currently gives you three choices:

$BEINCLUDES
This option scans all the files that can be found in the paths contained in this environmental variable. This includes all the Be Header files used for compiling, the ones you #include with <>.
Open Windows
This option searches through all the opened windows.
Directory
Directory scans the files in a particular directory. If you choose this option, several other options will become available:

Starting Directory

This popup menu can be used to choose the directory to be scanned. If you conducted a multi-file search beforehand, the directories used during the search will be part of this popup menu. You can also choose Other... which will bring up a dialog with which you can choose a new directory.
The list of directories can be manipulated with the Preferences Panel.

Recursive

If this option is checked, all the directories found beneath the starting directory will also be scanned. This means that if you choose /boot as the starting directory, all the directories on your harddisk will be scanned.

Text Files Only

This option, when checked, will limit the files to be searched to those having a mimetype starting with "text/". The effectiveness of this option depends on the correctness of the mimetypes. Files that have no type at all will be skipped.

File Name Filter

The last popup and edit box in the find dialog allows you to filter the files to be searched by way of their names. If you choose "File Name ends with" from the popup and type ".cpp" in the editbox, only files whose name end with ".cpp" will be searched.


Last updated: 05/17/98
Copyright 1997,1998, © Hekkelman Programmatuur,
info@hekkelman.com