ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Add/Edit/Search with Highlighting Pattern dialog

Last modified: 08 September 2023

This dialog helps create and edit custom patterns, which detect code that matches specific pattern and replace this code if necessary.

This topic describes controls in the dialog. For more information about searching and replacing code with custom patterns, refer to Structural Search and Replace and Create custom code inspections and quick-fixes.

This dialog can be opened in two modes.

  • When you use the ReSharper | Find | Search with Pattern command, which is duplicated in the context menu of the editor, the dialog opens in the search/replace mode, allowing you to start the search or replace right from the dialog using the corresponding buttons at the bottom.

  • When you use the Add Pattern/Edit buttons on the Code Inspection | Custom Patterns page of ReSharper options, the dialog opens in the pattern editing mode, providing additional fields for specifying pattern description. However, in this mode, the Search/Replace buttons are not available.

Edit Highlighting Pattern dialog