Learn the basics on how to use vEdit's flexible and powerful search and all the search modes and options that help with searching.

Search Within the Current File

1. Select SEARCH > Search (alt: F2 or Ctrl-F or Toolbar).


VEdit Search.png


2. Enter the search string, the sequence of characters to be located.

3. Select any desired search options. ( Search Modes and Search Options in detail]] )

4. Press Enter or the Next button to search in the forwards direction from the cursor position to the end of the file, or select Previous to search backwards towards the beginning of the file.


If the string is found, the cursor is positioned on its first character and the entire string is highlighted. If the search string is not found, VEDIT displays an error message.


Next Occurrence
To search for the next occurrence of the same string, select Search > Next ( F3 )
Previous Occurrence
To search for the previous occurrence of the same string, select Search > Previous ( Shift-F3 )

Previous search strings can be recalled. In the Windows version, click the recall arrow or press Cursor Down.You can also edit the search string being entered or that you recalled.

The online help accessed by clicking Help or F1 is extensive. It explains how to search for special characters such as “newline”, “null”, control and graphics characters.

Large Files: If the string is not found, VEDIT restores the cursor position. When editing huge (100+ Megabyte) files, this restore is time-consuming. If you set CONFIG > Search options > Restore edit position on error to “2”, the cursor is simply left at the end of the file.

vEdit Search Modes

The desired search mode can be selected in the Search dialog box. The initial mode is set by CONFIG > Search options > Default search mode.The default mode is “Pattern matching”.

Simple
A simple search without pattern matching or regular expressions is performed. There are no special characters; there is no “wildcard” type searching.
Pattern
vEdit's “pattern matching” can be used to search for many types of characters, e.g. “wildcards”. In this mode, only the “|” (pipe or vertical bar) character is special. Forexample use “|013” to search for a Carriage-Return, “|000” to search for a null. Use “||” to search for a single “|” character in the file.
Reg-Exp
UNIX-style “regular expressions” can be used to search for complex patterns of characters; portions of the matched text can also be used in the replacement side. Regular expressions are much more technical than pattern matching. It is generally not suitable for simple searches because many characters have a special meaning. To search for a special character, precede it with “\”.
Reg-Exp (MAX)
Both “minimal” and “maximized” type regular expressions are supported. See “Maximize Regular Expressions”, described later, for a description of this technical topic.

vEdit Search Options

Case
The search is case sensitive, e.g. a search for “the” will not match “The”. Otherwise, the search is not case sensitive. The dialog box’s initial value is set by CONFIG > Search options > Default Case-sensitive option.
Word
Restricts the search to entire “words”, e.g. a search for “the” will not find “there”, “other” and similar words. It is equivalent to entering, e.g. “|Sthe|S” using pattern matching.
Begin
Start searching from the beginning of the file; otherwise, the search starts from the current cursor position. In a block search, it starts searching at the beginning of the block.
Local
Restricts the search to the portion of the file currently in memory. It also causes the “Begin” option to start searching from the beginning of the text currently in memory. It can be useful when searching in huge (100+ Megabyte) files to prevent an unsuccessful search from wasting time examining the entire file when you only want to search nearby.
Block
Restricts the search to the highlighted block. This option is selected automatically if the cursor is within, or immediately past the block.

vEdit Search Notes

To search for a “newline”, use “|N” in pattern matching mode, or “\N” in regular expression mode.

To search for control (or other) characters, use “|ddd” in pattern matching mode, or “\dddd” in regular expression mode, where ‘ddd’ is the decimal value of the character. In the DOS version, you can alternatively press [ENTER CTRL] (<Ctrl-Q>) followed by the control character.

Character values can also be entered in hexadecimal using “|Hhh”in pattern matching mode, or “\hhh” in regular expression mode.

To search for a null character (decimal value 000), use “|000” in pattern matching mode, or “\d000” or “\0” in regular expression mode.

The search and replacement strings are limited to 260 characters.

The contents of a text register can be used as the entire search/replace string or as a portion of it. In pattern matching mode, use “|@(r)” to include text register ‘r’ in the search/replace string. In regular expression mode, use “\@(r)”. This permits “variable” search/replace strings.

DOS Version

The “terse” dialog box only displays some options. Immediately press Enter to switch to the full dialog box.

In the terse dialog box, the button [Again] re-uses the previously entered search string. It is often used in conjunction with the [ ] Begin option to restart the search from the beginning of the file, or with the [ ]Prev option to search again in the backwards direction.

Related Resources