Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Search (Description)
◄Summary► ◄Notes► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
The Search (/) command searches for a regular expression in a
source file.
"Regular expressions" are patterns of characters that may match
one or many different strings. The use of patterns to match more
than one string is similar to the DOS method of using wild-card
characters in file names. CodeView's regular expressions use a
subset of the UNIX syntax supported by the Programmer's WorkBench
(PWB).
If you enter the Search command with a regular expression, CodeView
searches the source file for the first line containing the
expression. If you do not give a regular expression, CodeView
searches for the next occurrence of the last regular expression
specified.
You can use the Search command without understanding
regular expressions. Since text strings are the simplest form of
regular expressions, you can enter a string of characters as the
expression you want to find. For example, you can enter
COUNT
if you want to search for the word 'COUNT' in the source file.
In regular expressions, the following characters have special
meanings:
Backslash (\) Period (.)
Asterisk (*) Dollar sign ($)
Left bracket ([) Caret (^)
To find strings containing these characters, you must precede the
characters with a backslash (\); this cancels their special
meanings. For example, use
x\*y
to find
x*y
See: ◄Regular Expressions (Special Characters)►
◄Options Menu: Case Sensitivity Command►
◄Options-Case Sense (OC) Command-Window Command►
In Source windows, CodeView starts searching at the current
cursor position and places the cursor at the next line containing
the regular expression. The search wraps to the beginning of the
file if necessary.
In the command window, CodeView starts searching at the last
source line displayed. It displays the source line in which the
expression is found.
See: ◄Source Window►
◄Command Window►
-♦-