Learn how to find and replace characters within a file in vEdit with Search and Replace.

Perform a Search and Replace

1. Select SEARCH > Replace ( Alt-F2 or Ctrl-H or Toolbar ).


VEdit Search And Replace.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. Enter the “replacement string” exactly as you want it in the file. Lower case letters are not converted to uppercase, nor do they match the case of the original text. (If you need this capability, you will have to use “Regular Expressions”).

If found, the cursor will be positioned just past the first occurrence of the located and highlighted text, and you are prompted

Select the desired option:

Yes
Replace the text for this occurrence and immediately search for the next occurrence.
No
Don’t replace the text for this occurrence; immediately search for the next occurrence.
All
Replace the text for this and all remaining occurrences without prompting. (Note: “all” occurrences are replaced only if the operation was started at the beginning of the file.)
One
Replace the text for this occurrence and return to normal editing.
Cancel
Don’t replace the text for this occurrence and cancel the replace operation; return to normal editing.

The description and notes for the earlier heading “Search Basics” apply here too.

With VEDIT’s “pattern matching”, located text cannot be part of the replacement text. However, the “regular expression” search mode has this capability. For example, the regular expression search string “{[Hh]}ello}” will locate “Hello” or “hello”. The replacement string “\1i” will replace “Hello” with “Hi”, and “hello” with “hi”. Regular expressions are fully described later in this topic.

Related Resources