Search and replace

from Wikipedia, the free encyclopedia
Search & replace toolbar of the WikEd editor ( binoculars as the usual symbol for “search”, recycling for “replace”):
Button fields (buttons) above :
- Find all matches
- Find previous matches Input field for search mask - With drop-down combo box for Select one previous search
- find next match
- find the selected text (backwards / forwards) - for direct input with marking
below :
- replace all matches (in the entire text or a selection)
- replace previous match input field for replacement text - with drop-down combo box for Choose a previous replacement
- Replace next match
- Search is case sensitive ( Aa)
- Search is a regular expression ( /R/)
- Search forward while typing

Find and replace is a feature found in many editors and word processing programs . It searches for one or more occurrences of a pattern (usually a character string ) and replaces it according to the user's specifications .

application

Find-and-replace functions are mostly used on character strings in text files and save the user time-consuming manual searching through a document as well as overwriting the occurrences. O26 , one of the first screen-oriented text editors , already had a simple function for search and replace.

Formatting can also be searched for or replaced in word processing programs such as OpenOffice Writer or Microsoft Word .

The principle of automated search and replacement is also transferred to other software, for example some graphics software offers the option of color replacement in images.

Options

Since there are no uniform standards for software, the design and scope of the function can vary considerably from program to program. However, there are certain options that are available in most cases when using the search and replace function in the context of strings:

Single or full search / replacement
Here you can decide whether the search should first go to the next occurrence and, if necessary, carry out the desired replacement there, or whether the program should completely mark all occurrences or replace them with the content entered. With the individual search or replacement, after finding or replacing, a switch or button can usually be used to jump to the next found location.
Search direction
The search function usually starts at the location of the document where the cursor is located. This setting can be used to determine whether you want to search towards the beginning or end of the document and - when the function has arrived there - whether it should search from there from the opposite side to the cursor.
Case sensitive ( Case sensitivity )
Specifies whether upper and lower case should be part of the search pattern (case sensitive) or ignored in the search (case insensitive). For example, a search for abcif the case is not case-sensitive will also find ABCand Abc.
Regular expression
Regular expressions allow very flexible character string patterns to be specified as search expressions, so that, for example, you can search for words with a given beginning and end. By back-referencing, for example, exchanges ( Klaus MüllerMüller, Klaus ) can be carried out with regular expressions . The syntax of the regular expressions shows different scope and different behavior depending on the program.

Related topics

  • With search and replace , simple leave refactoring -measures perform, such as renaming variables.
  • Another standard function in word processors and editors is copy and paste .

Individual evidence

  1. en: User: Cacycle / wikEd , English-language Wikipedia - the small text editor is also used by the German-language Wikipedia , see project page
  2. ^ O26 - File Editor. In: O26 Command Reference. Retrieved April 11, 2012 .
  3. Finding and replacing text. In: Handbook for OpenOffice Writer. October 14, 2009, accessed April 7, 2012 .
  4. Find and replace text or other elements. (No longer available online.) In: Word 2003 Help and How-To. Microsoft , archived from the original on April 21, 2012 ; Retrieved April 7, 2012 . Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / office.microsoft.com