---
title: "Find and replace - Developing programs - MetaEditor Help"
description: "The MetaEditor search system allows you to quickly find necessary elements in a program text. All MetaEditor search commands... - Find and replace - Developing programs - MetaEditor Help"
image: "https://www.metatrader5.com/i/logo_metatrader5.png"
url: "https://www.metatrader5.com/en/metaeditor/help/development/source_code_find"
---

[MetaEditor Help](https://www.metatrader5.com/en/metaeditor/help) → [Developing programs](https://www.metatrader5.com/en/metaeditor/help/development) → Find and replace

# Find and replace

The MetaEditor search system allows you to quickly find necessary elements in a program text. All MetaEditor search commands are located in the [Search](https://www.metatrader5.com/en/metaeditor/help/main_menu/main_menu_search) menu:

- ![Find](https://www.metatrader5.com/i/help/metaeditor/en/find_icon.png) Find... – open the search window. The same action is performed by pressing Ctrl+F.
- ![Find Next](https://www.metatrader5.com/i/help/metaeditor/en/find_next_icon.png) Find Next – find the next item matching a search query. The same action is performed by pressing F3.
- ![Find Previous](https://www.metatrader5.com/i/help/metaeditor/en/find_previous_icon.png) Find Previous – find the previous item matching a search query. The same action is performed by pressing Shift+F3.
- ![Replace](https://www.metatrader5.com/i/help/metaeditor/en/replace_icon.png) Replace... – open a window to replace the found text. The same action is performed by pressing Ctrl+H.
- ![Find in Files](https://www.metatrader5.com/i/help/metaeditor/en/find_in_files_icon.png) Find in Files... – open the [search window by different files](https://www.metatrader5.com/en/metaeditor/help/development/source_code_find#find_in_files). The same action is performed by pressing Ctrl+Shift+F.
- ![Go to Line](https://www.metatrader5.com/i/help/metaeditor/en/go_to_line_icon.png) Go to Line... – go to a line with a specified number.

![Replace](https://www.metatrader5.com/i/help/metaeditor/en/replace.png)

The find/replace window features the following parameters and commands:

- Find what – field to enter a search word or phrase.
- Replace with – field to enter a word or phrase that is to replace detected elements.
- Match case – enable/disable case sensitivity when executing the search query.
- Match whole word only – search by a particular word form: only words or phrases that exactly match the search query are found.
- Extended with \r \n \t – enable extended search with partial regular expression support. Use \r, \n, \t to specify line feed and tab characters in search requests.
- Backward direction – enable search up from the current cursor position.
- In selection – enable/disable search and replacement only in a selected text fragment.
- #include files – add the files, included into the current file via [#include](https://www.mql5.com/en/docs/basis/preprosessor/include), to Search and Replace. The option enables faster operations with projects consisting of multiple files. For example, to replace a text in all files, you will not need to specify their directories manually, while the editor can automatically find them through the #include directives.
- Find Next – move to the next found element. The same action is performed by pressing F3.
- Replace – replace a detected element.
- Replace All – replace all detected elements.

Search and Replace useful functions:

- If you select a text in the file and bring up the search box, the text will be automatically substituted in the "Find" field. If no text is selected, a text from the clipboard will be pasted in the "Find" field. If the clipboard is empty, the focus in the search box will be set to the "Find" field.
- A similar behavior is implemented for the replace window: the selected text is inserted in the search field, and the cursor is moved to the "Replace with" field. Thus, you can immediately enter the required new text.
- Search and replace results are shown in the [log](https://www.metatrader5.com/en/metaeditor/help/workspace/toolbox#journal). If the Toolbox window is enabled, the Journal tab will be automatically selected in it.

## Find in Files [#](#find_in_files)

This type of search allows you to find code elements in multiple files at once, rather than in the current window only. Click ![Find in Files](https://www.metatrader5.com/i/help/metaeditor/en/find_in_files_icon.png) Find in Files... in the Search menu or press Ctrl+Shift+F.

![Find in Files](https://www.metatrader5.com/i/help/metaeditor/en/find_in_files.png)

The Find In Files window features the following parameters and commands:

- Find what – field to enter a search word or phrase.
- Replace with – field to enter a word or phrase that is to replace detected elements.
- Filter – files the search is performed in. You can specify names of specific files separated by semicolons or file masks using the "*" symbol. For example, *.mq5 means searching all files with MQ5 extension.
- Folder – folder the search is performed in. To select a folder, click ![Overview](https://www.metatrader5.com/i/help/metaeditor/en/browse_button.png). For convenience, you can use the %terminal% macro instead of the full path to the platform data directory. For example, %terminal%\MQL5\Experts.
- Look in subfolders – enable/disable search in all subfolders of a specified folder.
- Match case – enable/disable case sensitivity when executing the search query.
- Match whole word only – search by a particular word form: only words or phrases that exactly match the search query are found.
- Extended with \r \n \t – enable extended search with partial regular expression support. Use \r, \n, \t to specify line feed and tab characters in search requests.
- Find All – perform a search on request.
- Replace in Files – replace found elements in all files.

Results of searching in files are displayed on the Search tab of the [Toolbox](https://www.metatrader5.com/en/metaeditor/help/workspace/toolbox#search) window. If the search request yields no results, the appropriate message is displayed on the Search tab.

## Search in the Community [#](#community)

MetaEditor features the smart and high-performance search throughout [MQL5.community](https://www.mql5.com/) – community of traders and MQL4/MQL5 developers. The site contains a lot of useful information: [documentation](https://www.mql5.com/ru/docs), [forum](https://www.mql5.com/ru/forum), [blogs](https://www.mql5.com/ru/blogs) of traders and analysts, [articles](https://www.mql5.com/ru/articles) related to programming and platform use. The community provides access to the huge [source code database](https://www.metatrader5.com/en/metaeditor/help/workspace/toolbox#codebase) and [the application store](https://www.mql5.com/ru/market)for the platform.

In addition to MQL5.community, the search includes other popular platforms, such as GitHub, MSDN and Stack Overflow.

![Search in the MQL5.community](https://www.metatrader5.com/i/help/metaeditor/en/find_community.png)

Search results from external resources appear in the [toolbox window](https://www.metatrader5.com/en/metaeditor/help/workspace/toolbox#search):

![GitHub and MSDN search results](https://www.metatrader5.com/i/help/metaeditor/en/find_github.png)

Furthermore, you can immediately download source files from GitHub. Files are downloaded into a separate subdirectory of the Projects folder, named in accordance with the GitHub project name.

## In this section

- [Intelligent management](https://www.metatrader5.com/en/metaeditor/help/development/intelligent_management)
- Find and replace
- [Styler](https://www.metatrader5.com/en/metaeditor/help/development/styler)
- [Compilation](https://www.metatrader5.com/en/metaeditor/help/development/compile)
- [MQL5 Cloud Protector: Advanced protection for programs](https://www.metatrader5.com/en/metaeditor/help/development/mql5_cloud_protector)
- [Code debugging](https://www.metatrader5.com/en/metaeditor/help/development/debug)
- [Code profiling](https://www.metatrader5.com/en/metaeditor/help/development/profiling)
- [AI Assistant](https://www.metatrader5.com/en/metaeditor/help/development/ai_assistant)
- [Generating included code](https://www.metatrader5.com/en/metaeditor/help/development/generate_mqh)
- [Working with C++ DLL (integration with MS Visual Studio)](https://www.metatrader5.com/en/metaeditor/help/development/c_dll)
- [Working with Python](https://www.metatrader5.com/en/metaeditor/help/development/python)
- [OpenCL support](https://www.metatrader5.com/en/metaeditor/help/development/opencl)

```json
{"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {"@type": "ListItem", "position": 1, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help", "name": "MetaEditor Help"}}, {"@type": "ListItem", "position": 2, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help/development", "name": "Developing programs"}}, {"@type": "ListItem", "position": 3, "item": {"@id": "https://www.metatrader5.com/en/metaeditor/help/development/source_code_find", "name": "Find and replace"}} ]}
{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "MetaTrader 5: Find and replace", "acceptedAnswer": { "@type": "Answer", "text": "The MetaEditor search system allows you to quickly find necessary elements in a program text. All MetaEditor search commands are located in the..." } }] }
```
